2014-05-08 21:56:51 +00:00
|
|
|
/*
|
|
|
|
* libxl_migration.h: methods for handling migration with libxenlight
|
|
|
|
*
|
|
|
|
* Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2019-06-07 20:20:29 +00:00
|
|
|
#pragma once
|
2014-05-08 21:56:51 +00:00
|
|
|
|
2019-06-07 20:20:29 +00:00
|
|
|
#include "libxl_conf.h"
|
2014-05-08 21:56:51 +00:00
|
|
|
|
2019-06-07 20:20:29 +00:00
|
|
|
#define LIBXL_MIGRATION_FLAGS \
|
2017-11-03 12:09:47 +00:00
|
|
|
(VIR_MIGRATE_LIVE | \
|
|
|
|
VIR_MIGRATE_PEER2PEER | \
|
|
|
|
VIR_MIGRATE_TUNNELLED | \
|
|
|
|
VIR_MIGRATE_PERSIST_DEST | \
|
|
|
|
VIR_MIGRATE_UNDEFINE_SOURCE | \
|
2014-05-08 21:56:51 +00:00
|
|
|
VIR_MIGRATE_PAUSED)
|
|
|
|
|
|
|
|
/* All supported migration parameters and their types. */
|
2019-06-07 20:20:29 +00:00
|
|
|
#define LIBXL_MIGRATION_PARAMETERS \
|
2014-05-08 21:56:51 +00:00
|
|
|
VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \
|
|
|
|
VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \
|
|
|
|
VIR_MIGRATE_PARAM_DEST_XML, VIR_TYPED_PARAM_STRING, \
|
|
|
|
NULL
|
|
|
|
|
|
|
|
char *
|
2018-03-20 17:42:56 +00:00
|
|
|
libxlDomainMigrationSrcBegin(virConnectPtr conn,
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainObj *vm,
|
2018-03-20 17:42:56 +00:00
|
|
|
const char *xmlin,
|
|
|
|
char **cookieout,
|
|
|
|
int *cookieoutlen);
|
2014-05-08 21:56:51 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainDef *
|
|
|
|
libxlDomainMigrationDstPrepareDef(libxlDriverPrivate *driver,
|
2018-03-20 17:42:56 +00:00
|
|
|
const char *dom_xml,
|
|
|
|
const char *dname);
|
|
|
|
|
|
|
|
int
|
|
|
|
libxlDomainMigrationDstPrepareTunnel3(virConnectPtr dconn,
|
|
|
|
virStreamPtr st,
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainDef **def,
|
2018-03-20 17:42:56 +00:00
|
|
|
const char *cookiein,
|
|
|
|
int cookieinlen,
|
|
|
|
unsigned int flags);
|
2014-05-08 21:56:51 +00:00
|
|
|
|
2017-02-15 11:17:38 +00:00
|
|
|
int
|
2018-03-20 17:42:56 +00:00
|
|
|
libxlDomainMigrationDstPrepare(virConnectPtr dconn,
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainDef **def,
|
2018-03-20 17:42:56 +00:00
|
|
|
const char *uri_in,
|
|
|
|
char **uri_out,
|
|
|
|
const char *cookiein,
|
|
|
|
int cookieinlen,
|
|
|
|
unsigned int flags);
|
2017-02-15 11:17:38 +00:00
|
|
|
|
2014-05-08 21:56:51 +00:00
|
|
|
int
|
2021-03-11 07:16:13 +00:00
|
|
|
libxlDomainMigrationSrcPerformP2P(libxlDriverPrivate *driver,
|
|
|
|
virDomainObj *vm,
|
2018-03-20 17:42:56 +00:00
|
|
|
virConnectPtr sconn,
|
|
|
|
const char *dom_xml,
|
|
|
|
const char *dconnuri,
|
|
|
|
const char *uri_str,
|
|
|
|
const char *dname,
|
|
|
|
unsigned int flags);
|
2014-05-08 21:56:51 +00:00
|
|
|
|
2016-02-05 20:45:02 +00:00
|
|
|
int
|
2021-03-11 07:16:13 +00:00
|
|
|
libxlDomainMigrationSrcPerform(libxlDriverPrivate *driver,
|
|
|
|
virDomainObj *vm,
|
2016-02-05 20:45:02 +00:00
|
|
|
const char *dom_xml,
|
|
|
|
const char *dconnuri,
|
|
|
|
const char *uri_str,
|
|
|
|
const char *dname,
|
|
|
|
unsigned int flags);
|
|
|
|
|
2014-05-08 21:56:51 +00:00
|
|
|
virDomainPtr
|
2018-03-20 17:42:56 +00:00
|
|
|
libxlDomainMigrationDstFinish(virConnectPtr dconn,
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainObj *vm,
|
2018-03-20 17:42:56 +00:00
|
|
|
unsigned int flags,
|
|
|
|
int cancelled);
|
2014-05-08 21:56:51 +00:00
|
|
|
|
|
|
|
int
|
2021-03-11 07:16:13 +00:00
|
|
|
libxlDomainMigrationSrcConfirm(libxlDriverPrivate *driver,
|
|
|
|
virDomainObj *vm,
|
2018-03-20 17:42:56 +00:00
|
|
|
unsigned int flags,
|
|
|
|
int cancelled);
|