2018-02-21 14:18:03 +01:00
|
|
|
/*
|
|
|
|
* qemu_migration_params.h: QEMU migration parameters handling
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006-2018 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-12-13 14:53:50 +00:00
|
|
|
#ifndef LIBVIRT_QEMU_MIGRATION_PARAMS_H
|
|
|
|
# define LIBVIRT_QEMU_MIGRATION_PARAMS_H
|
2018-02-21 14:18:03 +01:00
|
|
|
|
|
|
|
# include "internal.h"
|
|
|
|
|
2018-03-13 16:08:49 +01:00
|
|
|
# include "virbuffer.h"
|
|
|
|
# include "virxml.h"
|
2018-02-21 14:18:03 +01:00
|
|
|
# include "qemu_monitor.h"
|
|
|
|
# include "qemu_conf.h"
|
|
|
|
|
2018-04-05 22:17:26 +02:00
|
|
|
typedef enum {
|
|
|
|
QEMU_MIGRATION_CAP_XBZRLE,
|
|
|
|
QEMU_MIGRATION_CAP_AUTO_CONVERGE,
|
|
|
|
QEMU_MIGRATION_CAP_RDMA_PIN_ALL,
|
|
|
|
QEMU_MIGRATION_CAP_EVENTS,
|
|
|
|
QEMU_MIGRATION_CAP_POSTCOPY,
|
|
|
|
QEMU_MIGRATION_CAP_COMPRESS,
|
|
|
|
QEMU_MIGRATION_CAP_PAUSE_BEFORE_SWITCHOVER,
|
2018-04-17 14:46:29 +02:00
|
|
|
QEMU_MIGRATION_CAP_LATE_BLOCK_ACTIVATE,
|
2019-02-06 11:53:19 +01:00
|
|
|
QEMU_MIGRATION_CAP_MULTIFD,
|
2018-04-05 22:17:26 +02:00
|
|
|
|
|
|
|
QEMU_MIGRATION_CAP_LAST
|
|
|
|
} qemuMigrationCapability;
|
2019-01-20 11:04:56 -05:00
|
|
|
VIR_ENUM_DECL(qemuMigrationCapability);
|
2018-04-05 22:17:26 +02:00
|
|
|
|
2018-03-28 18:25:58 +02:00
|
|
|
typedef enum {
|
|
|
|
QEMU_MIGRATION_PARAM_COMPRESS_LEVEL,
|
|
|
|
QEMU_MIGRATION_PARAM_COMPRESS_THREADS,
|
|
|
|
QEMU_MIGRATION_PARAM_DECOMPRESS_THREADS,
|
|
|
|
QEMU_MIGRATION_PARAM_THROTTLE_INITIAL,
|
|
|
|
QEMU_MIGRATION_PARAM_THROTTLE_INCREMENT,
|
|
|
|
QEMU_MIGRATION_PARAM_TLS_CREDS,
|
|
|
|
QEMU_MIGRATION_PARAM_TLS_HOSTNAME,
|
|
|
|
QEMU_MIGRATION_PARAM_MAX_BANDWIDTH,
|
|
|
|
QEMU_MIGRATION_PARAM_DOWNTIME_LIMIT,
|
|
|
|
QEMU_MIGRATION_PARAM_BLOCK_INCREMENTAL,
|
|
|
|
QEMU_MIGRATION_PARAM_XBZRLE_CACHE_SIZE,
|
2019-01-31 10:25:11 +01:00
|
|
|
QEMU_MIGRATION_PARAM_MAX_POSTCOPY_BANDWIDTH,
|
2019-02-06 11:53:19 +01:00
|
|
|
QEMU_MIGRATION_PARAM_MULTIFD_CHANNELS,
|
2018-03-28 18:25:58 +02:00
|
|
|
|
|
|
|
QEMU_MIGRATION_PARAM_LAST
|
|
|
|
} qemuMigrationParam;
|
2018-02-21 14:18:03 +01:00
|
|
|
|
2018-02-21 17:22:29 +01:00
|
|
|
typedef struct _qemuMigrationParams qemuMigrationParams;
|
|
|
|
typedef qemuMigrationParams *qemuMigrationParamsPtr;
|
|
|
|
|
2018-03-09 11:23:49 +01:00
|
|
|
typedef enum {
|
|
|
|
QEMU_MIGRATION_SOURCE = (1 << 0),
|
|
|
|
QEMU_MIGRATION_DESTINATION = (1 << 1),
|
|
|
|
} qemuMigrationParty;
|
|
|
|
|
2018-02-21 17:22:29 +01:00
|
|
|
|
2018-04-06 10:18:52 +02:00
|
|
|
virBitmapPtr
|
|
|
|
qemuMigrationParamsGetAlwaysOnCaps(qemuMigrationParty party);
|
|
|
|
|
2018-02-21 17:22:29 +01:00
|
|
|
qemuMigrationParamsPtr
|
2018-02-21 14:18:03 +01:00
|
|
|
qemuMigrationParamsFromFlags(virTypedParameterPtr params,
|
|
|
|
int nparams,
|
2018-03-09 11:23:49 +01:00
|
|
|
unsigned long flags,
|
2018-03-09 17:30:16 +01:00
|
|
|
qemuMigrationParty party);
|
2018-02-21 14:18:03 +01:00
|
|
|
|
2018-03-12 14:19:56 +01:00
|
|
|
int
|
2018-03-12 15:50:06 +01:00
|
|
|
qemuMigrationParamsDump(qemuMigrationParamsPtr migParams,
|
|
|
|
virTypedParameterPtr *params,
|
|
|
|
int *nparams,
|
|
|
|
int *maxparams,
|
|
|
|
unsigned long *flags);
|
2018-03-12 14:19:56 +01:00
|
|
|
|
2019-02-04 17:11:42 +01:00
|
|
|
qemuMigrationParamsPtr
|
|
|
|
qemuMigrationParamsNew(void);
|
|
|
|
|
2018-02-21 14:18:03 +01:00
|
|
|
void
|
2018-02-21 17:22:29 +01:00
|
|
|
qemuMigrationParamsFree(qemuMigrationParamsPtr migParams);
|
2019-02-07 12:18:52 -05:00
|
|
|
VIR_DEFINE_AUTOPTR_FUNC(qemuMigrationParams, qemuMigrationParamsFree);
|
2018-02-21 14:18:03 +01:00
|
|
|
|
|
|
|
int
|
2018-02-28 14:44:12 +01:00
|
|
|
qemuMigrationParamsApply(virQEMUDriverPtr driver,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
int asyncJob,
|
|
|
|
qemuMigrationParamsPtr migParams);
|
2018-02-21 14:18:03 +01:00
|
|
|
|
|
|
|
int
|
2018-02-28 10:45:07 +01:00
|
|
|
qemuMigrationParamsEnableTLS(virQEMUDriverPtr driver,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
bool tlsListen,
|
|
|
|
int asyncJob,
|
|
|
|
char **tlsAlias,
|
2018-02-28 12:57:19 +01:00
|
|
|
const char *hostname,
|
2018-02-28 10:45:07 +01:00
|
|
|
qemuMigrationParamsPtr migParams);
|
2018-02-21 14:18:03 +01:00
|
|
|
|
|
|
|
int
|
2018-02-28 09:35:53 +01:00
|
|
|
qemuMigrationParamsDisableTLS(virDomainObjPtr vm,
|
|
|
|
qemuMigrationParamsPtr migParams);
|
2018-02-21 14:18:03 +01:00
|
|
|
|
2018-03-15 11:27:07 +01:00
|
|
|
int
|
|
|
|
qemuMigrationParamsFetch(virQEMUDriverPtr driver,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
int asyncJob,
|
|
|
|
qemuMigrationParamsPtr *migParams);
|
|
|
|
|
2019-02-04 17:11:42 +01:00
|
|
|
int
|
|
|
|
qemuMigrationParamsSetULL(qemuMigrationParamsPtr migParams,
|
|
|
|
qemuMigrationParam param,
|
|
|
|
unsigned long long value);
|
|
|
|
|
2018-03-15 11:39:50 +01:00
|
|
|
int
|
2018-03-16 11:56:21 +01:00
|
|
|
qemuMigrationParamsGetULL(qemuMigrationParamsPtr migParams,
|
|
|
|
qemuMigrationParam param,
|
|
|
|
unsigned long long *value);
|
2018-03-15 11:39:50 +01:00
|
|
|
|
2018-02-27 15:45:52 +01:00
|
|
|
int
|
|
|
|
qemuMigrationParamsCheck(virQEMUDriverPtr driver,
|
|
|
|
virDomainObjPtr vm,
|
2018-03-07 10:45:18 +01:00
|
|
|
int asyncJob,
|
2018-04-06 14:02:04 +02:00
|
|
|
qemuMigrationParamsPtr migParams,
|
|
|
|
virBitmapPtr remoteCaps);
|
2018-02-27 15:45:52 +01:00
|
|
|
|
2018-02-21 14:18:03 +01:00
|
|
|
void
|
|
|
|
qemuMigrationParamsReset(virQEMUDriverPtr driver,
|
|
|
|
virDomainObjPtr vm,
|
2018-02-27 17:09:17 +01:00
|
|
|
int asyncJob,
|
2018-03-21 14:57:44 +01:00
|
|
|
qemuMigrationParamsPtr origParams,
|
|
|
|
unsigned long apiFlags);
|
2018-02-21 14:18:03 +01:00
|
|
|
|
2018-03-13 16:08:49 +01:00
|
|
|
void
|
|
|
|
qemuMigrationParamsFormat(virBufferPtr buf,
|
|
|
|
qemuMigrationParamsPtr migParams);
|
|
|
|
|
|
|
|
int
|
|
|
|
qemuMigrationParamsParse(xmlXPathContextPtr ctxt,
|
|
|
|
qemuMigrationParamsPtr *migParams);
|
|
|
|
|
2018-02-20 16:40:21 +01:00
|
|
|
int
|
|
|
|
qemuMigrationCapsCheck(virQEMUDriverPtr driver,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
int asyncJob);
|
|
|
|
|
2018-04-06 15:22:51 +02:00
|
|
|
bool
|
|
|
|
qemuMigrationCapsGet(virDomainObjPtr vm,
|
2018-04-05 22:17:26 +02:00
|
|
|
qemuMigrationCapability cap);
|
2018-04-06 15:22:51 +02:00
|
|
|
|
2018-12-13 14:53:50 +00:00
|
|
|
#endif /* LIBVIRT_QEMU_MIGRATION_PARAMS_H */
|