mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
qemu: Implement auto convergence migration parameters
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
abaa11006f
commit
445853e1ba
@ -11764,6 +11764,7 @@ qemuDomainMigratePerform(virDomainPtr dom,
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
const char *dconnuri = NULL;
|
const char *dconnuri = NULL;
|
||||||
qemuMigrationCompressionPtr compression = NULL;
|
qemuMigrationCompressionPtr compression = NULL;
|
||||||
|
qemuMonitorMigrationParams migParams = { 0 };
|
||||||
|
|
||||||
virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
|
virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
|
||||||
|
|
||||||
@ -11798,7 +11799,7 @@ qemuDomainMigratePerform(virDomainPtr dom,
|
|||||||
*/
|
*/
|
||||||
ret = qemuMigrationPerform(driver, dom->conn, vm, NULL,
|
ret = qemuMigrationPerform(driver, dom->conn, vm, NULL,
|
||||||
NULL, dconnuri, uri, NULL, NULL, 0, NULL, 0,
|
NULL, dconnuri, uri, NULL, NULL, 0, NULL, 0,
|
||||||
compression, cookie, cookielen,
|
compression, &migParams, cookie, cookielen,
|
||||||
NULL, NULL, /* No output cookies in v2 */
|
NULL, NULL, /* No output cookies in v2 */
|
||||||
flags, dname, resource, false);
|
flags, dname, resource, false);
|
||||||
|
|
||||||
@ -12187,6 +12188,7 @@ qemuDomainMigratePerform3(virDomainPtr dom,
|
|||||||
virQEMUDriverPtr driver = dom->conn->privateData;
|
virQEMUDriverPtr driver = dom->conn->privateData;
|
||||||
virDomainObjPtr vm;
|
virDomainObjPtr vm;
|
||||||
qemuMigrationCompressionPtr compression = NULL;
|
qemuMigrationCompressionPtr compression = NULL;
|
||||||
|
qemuMonitorMigrationParams migParams = { 0 };
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
|
virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
|
||||||
@ -12204,7 +12206,7 @@ qemuDomainMigratePerform3(virDomainPtr dom,
|
|||||||
|
|
||||||
ret = qemuMigrationPerform(driver, dom->conn, vm, xmlin, NULL,
|
ret = qemuMigrationPerform(driver, dom->conn, vm, xmlin, NULL,
|
||||||
dconnuri, uri, NULL, NULL, 0, NULL, 0,
|
dconnuri, uri, NULL, NULL, 0, NULL, 0,
|
||||||
compression,
|
compression, &migParams,
|
||||||
cookiein, cookieinlen,
|
cookiein, cookieinlen,
|
||||||
cookieout, cookieoutlen,
|
cookieout, cookieoutlen,
|
||||||
flags, dname, resource, true);
|
flags, dname, resource, true);
|
||||||
@ -12238,6 +12240,7 @@ qemuDomainMigratePerform3Params(virDomainPtr dom,
|
|||||||
unsigned long long bandwidth = 0;
|
unsigned long long bandwidth = 0;
|
||||||
int nbdPort = 0;
|
int nbdPort = 0;
|
||||||
qemuMigrationCompressionPtr compression = NULL;
|
qemuMigrationCompressionPtr compression = NULL;
|
||||||
|
qemuMonitorMigrationParamsPtr migParams = NULL;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
|
virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
|
||||||
@ -12277,6 +12280,9 @@ qemuDomainMigratePerform3Params(virDomainPtr dom,
|
|||||||
if (nmigrate_disks < 0)
|
if (nmigrate_disks < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
if (!(migParams = qemuMigrationParams(params, nparams, flags)))
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
if (!(compression = qemuMigrationCompressionParse(params, nparams, flags)))
|
if (!(compression = qemuMigrationCompressionParse(params, nparams, flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -12291,11 +12297,12 @@ qemuDomainMigratePerform3Params(virDomainPtr dom,
|
|||||||
ret = qemuMigrationPerform(driver, dom->conn, vm, dom_xml, persist_xml,
|
ret = qemuMigrationPerform(driver, dom->conn, vm, dom_xml, persist_xml,
|
||||||
dconnuri, uri, graphicsuri, listenAddress,
|
dconnuri, uri, graphicsuri, listenAddress,
|
||||||
nmigrate_disks, migrate_disks, nbdPort,
|
nmigrate_disks, migrate_disks, nbdPort,
|
||||||
compression,
|
compression, migParams,
|
||||||
cookiein, cookieinlen, cookieout, cookieoutlen,
|
cookiein, cookieinlen, cookieout, cookieoutlen,
|
||||||
flags, dname, bandwidth, true);
|
flags, dname, bandwidth, true);
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(compression);
|
VIR_FREE(compression);
|
||||||
|
VIR_FREE(migParams);
|
||||||
VIR_FREE(migrate_disks);
|
VIR_FREE(migrate_disks);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -3479,6 +3479,52 @@ qemuMigrationSetCompression(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
qemuMonitorMigrationParamsPtr
|
||||||
|
qemuMigrationParams(virTypedParameterPtr params,
|
||||||
|
int nparams,
|
||||||
|
unsigned long flags)
|
||||||
|
{
|
||||||
|
qemuMonitorMigrationParamsPtr migParams;
|
||||||
|
|
||||||
|
if (VIR_ALLOC(migParams) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!params)
|
||||||
|
return migParams;
|
||||||
|
|
||||||
|
#define GET(PARAM, VAR) \
|
||||||
|
do { \
|
||||||
|
int rc; \
|
||||||
|
if ((rc = virTypedParamsGetInt(params, nparams, \
|
||||||
|
VIR_MIGRATE_PARAM_ ## PARAM, \
|
||||||
|
&migParams->VAR)) < 0) \
|
||||||
|
goto error; \
|
||||||
|
\
|
||||||
|
if (rc == 1) \
|
||||||
|
migParams->VAR ## _set = true; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
GET(AUTO_CONVERGE_INITIAL, cpuThrottleInitial);
|
||||||
|
GET(AUTO_CONVERGE_INCREMENT, cpuThrottleIncrement);
|
||||||
|
|
||||||
|
#undef GET
|
||||||
|
|
||||||
|
if ((migParams->cpuThrottleInitial_set ||
|
||||||
|
migParams->cpuThrottleIncrement_set) &&
|
||||||
|
!(flags & VIR_MIGRATE_AUTO_CONVERGE)) {
|
||||||
|
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||||
|
_("Turn auto convergence on to tune it"));
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
return migParams;
|
||||||
|
|
||||||
|
error:
|
||||||
|
VIR_FREE(migParams);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuMigrationSetParams(virQEMUDriverPtr driver,
|
qemuMigrationSetParams(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
@ -4564,7 +4610,8 @@ qemuMigrationRun(virQEMUDriverPtr driver,
|
|||||||
const char *graphicsuri,
|
const char *graphicsuri,
|
||||||
size_t nmigrate_disks,
|
size_t nmigrate_disks,
|
||||||
const char **migrate_disks,
|
const char **migrate_disks,
|
||||||
qemuMigrationCompressionPtr compression)
|
qemuMigrationCompressionPtr compression,
|
||||||
|
qemuMonitorMigrationParamsPtr migParams)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
unsigned int migrate_flags = QEMU_MONITOR_MIGRATE_BACKGROUND;
|
unsigned int migrate_flags = QEMU_MONITOR_MIGRATE_BACKGROUND;
|
||||||
@ -4582,7 +4629,6 @@ qemuMigrationRun(virQEMUDriverPtr driver,
|
|||||||
virDomainDefPtr persistDef = NULL;
|
virDomainDefPtr persistDef = NULL;
|
||||||
char *timestamp;
|
char *timestamp;
|
||||||
int rc;
|
int rc;
|
||||||
qemuMonitorMigrationParams migParams = { 0 };
|
|
||||||
|
|
||||||
VIR_DEBUG("driver=%p, vm=%p, cookiein=%s, cookieinlen=%d, "
|
VIR_DEBUG("driver=%p, vm=%p, cookiein=%s, cookieinlen=%d, "
|
||||||
"cookieout=%p, cookieoutlen=%p, flags=%lx, resource=%lu, "
|
"cookieout=%p, cookieoutlen=%p, flags=%lx, resource=%lu, "
|
||||||
@ -4663,7 +4709,7 @@ qemuMigrationRun(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (qemuMigrationSetCompression(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT,
|
if (qemuMigrationSetCompression(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT,
|
||||||
compression, &migParams) < 0)
|
compression, migParams) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (qemuMigrationSetOption(driver, vm,
|
if (qemuMigrationSetOption(driver, vm,
|
||||||
@ -4684,7 +4730,7 @@ qemuMigrationRun(virQEMUDriverPtr driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (qemuMigrationSetParams(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT,
|
if (qemuMigrationSetParams(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT,
|
||||||
&migParams) < 0)
|
migParams) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (qemuDomainObjEnterMonitorAsync(driver, vm,
|
if (qemuDomainObjEnterMonitorAsync(driver, vm,
|
||||||
@ -4918,7 +4964,8 @@ static int doNativeMigrate(virQEMUDriverPtr driver,
|
|||||||
const char *graphicsuri,
|
const char *graphicsuri,
|
||||||
size_t nmigrate_disks,
|
size_t nmigrate_disks,
|
||||||
const char **migrate_disks,
|
const char **migrate_disks,
|
||||||
qemuMigrationCompressionPtr compression)
|
qemuMigrationCompressionPtr compression,
|
||||||
|
qemuMonitorMigrationParamsPtr migParams)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
virURIPtr uribits = NULL;
|
virURIPtr uribits = NULL;
|
||||||
@ -4969,7 +5016,7 @@ static int doNativeMigrate(virQEMUDriverPtr driver,
|
|||||||
ret = qemuMigrationRun(driver, vm, persist_xml, cookiein, cookieinlen, cookieout,
|
ret = qemuMigrationRun(driver, vm, persist_xml, cookiein, cookieinlen, cookieout,
|
||||||
cookieoutlen, flags, resource, &spec, dconn,
|
cookieoutlen, flags, resource, &spec, dconn,
|
||||||
graphicsuri, nmigrate_disks, migrate_disks,
|
graphicsuri, nmigrate_disks, migrate_disks,
|
||||||
compression);
|
compression, migParams);
|
||||||
|
|
||||||
if (spec.destType == MIGRATION_DEST_FD)
|
if (spec.destType == MIGRATION_DEST_FD)
|
||||||
VIR_FORCE_CLOSE(spec.dest.fd.qemu);
|
VIR_FORCE_CLOSE(spec.dest.fd.qemu);
|
||||||
@ -4995,7 +5042,8 @@ static int doTunnelMigrate(virQEMUDriverPtr driver,
|
|||||||
const char *graphicsuri,
|
const char *graphicsuri,
|
||||||
size_t nmigrate_disks,
|
size_t nmigrate_disks,
|
||||||
const char **migrate_disks,
|
const char **migrate_disks,
|
||||||
qemuMigrationCompressionPtr compression)
|
qemuMigrationCompressionPtr compression,
|
||||||
|
qemuMonitorMigrationParamsPtr migParams)
|
||||||
{
|
{
|
||||||
virNetSocketPtr sock = NULL;
|
virNetSocketPtr sock = NULL;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -5033,7 +5081,7 @@ static int doTunnelMigrate(virQEMUDriverPtr driver,
|
|||||||
ret = qemuMigrationRun(driver, vm, persist_xml, cookiein, cookieinlen,
|
ret = qemuMigrationRun(driver, vm, persist_xml, cookiein, cookieinlen,
|
||||||
cookieout, cookieoutlen, flags, resource, &spec,
|
cookieout, cookieoutlen, flags, resource, &spec,
|
||||||
dconn, graphicsuri, nmigrate_disks, migrate_disks,
|
dconn, graphicsuri, nmigrate_disks, migrate_disks,
|
||||||
compression);
|
compression, migParams);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (spec.destType == MIGRATION_DEST_FD) {
|
if (spec.destType == MIGRATION_DEST_FD) {
|
||||||
@ -5072,6 +5120,7 @@ static int doPeer2PeerMigrate2(virQEMUDriverPtr driver,
|
|||||||
virStreamPtr st = NULL;
|
virStreamPtr st = NULL;
|
||||||
unsigned long destflags;
|
unsigned long destflags;
|
||||||
qemuMigrationCompressionPtr compression = NULL;
|
qemuMigrationCompressionPtr compression = NULL;
|
||||||
|
qemuMonitorMigrationParams migParams = { 0 };
|
||||||
|
|
||||||
VIR_DEBUG("driver=%p, sconn=%p, dconn=%p, vm=%p, dconnuri=%s, "
|
VIR_DEBUG("driver=%p, sconn=%p, dconn=%p, vm=%p, dconnuri=%s, "
|
||||||
"flags=%lx, dname=%s, resource=%lu",
|
"flags=%lx, dname=%s, resource=%lu",
|
||||||
@ -5148,12 +5197,13 @@ static int doPeer2PeerMigrate2(virQEMUDriverPtr driver,
|
|||||||
ret = doTunnelMigrate(driver, vm, st, NULL,
|
ret = doTunnelMigrate(driver, vm, st, NULL,
|
||||||
NULL, 0, NULL, NULL,
|
NULL, 0, NULL, NULL,
|
||||||
flags, resource, dconn,
|
flags, resource, dconn,
|
||||||
NULL, 0, NULL, compression);
|
NULL, 0, NULL, compression, &migParams);
|
||||||
else
|
else
|
||||||
ret = doNativeMigrate(driver, vm, NULL, uri_out,
|
ret = doNativeMigrate(driver, vm, NULL, uri_out,
|
||||||
cookie, cookielen,
|
cookie, cookielen,
|
||||||
NULL, NULL, /* No out cookie with v2 migration */
|
NULL, NULL, /* No out cookie with v2 migration */
|
||||||
flags, resource, dconn, NULL, 0, NULL, compression);
|
flags, resource, dconn, NULL, 0, NULL,
|
||||||
|
compression, &migParams);
|
||||||
|
|
||||||
/* Perform failed. Make sure Finish doesn't overwrite the error */
|
/* Perform failed. Make sure Finish doesn't overwrite the error */
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -5221,6 +5271,7 @@ doPeer2PeerMigrate3(virQEMUDriverPtr driver,
|
|||||||
const char **migrate_disks,
|
const char **migrate_disks,
|
||||||
int nbdPort,
|
int nbdPort,
|
||||||
qemuMigrationCompressionPtr compression,
|
qemuMigrationCompressionPtr compression,
|
||||||
|
qemuMonitorMigrationParamsPtr migParams,
|
||||||
unsigned long long bandwidth,
|
unsigned long long bandwidth,
|
||||||
bool useParams,
|
bool useParams,
|
||||||
unsigned long flags)
|
unsigned long flags)
|
||||||
@ -5392,13 +5443,15 @@ doPeer2PeerMigrate3(virQEMUDriverPtr driver,
|
|||||||
cookiein, cookieinlen,
|
cookiein, cookieinlen,
|
||||||
&cookieout, &cookieoutlen,
|
&cookieout, &cookieoutlen,
|
||||||
flags, bandwidth, dconn, graphicsuri,
|
flags, bandwidth, dconn, graphicsuri,
|
||||||
nmigrate_disks, migrate_disks, compression);
|
nmigrate_disks, migrate_disks, compression,
|
||||||
|
migParams);
|
||||||
} else {
|
} else {
|
||||||
ret = doNativeMigrate(driver, vm, persist_xml, uri,
|
ret = doNativeMigrate(driver, vm, persist_xml, uri,
|
||||||
cookiein, cookieinlen,
|
cookiein, cookieinlen,
|
||||||
&cookieout, &cookieoutlen,
|
&cookieout, &cookieoutlen,
|
||||||
flags, bandwidth, dconn, graphicsuri,
|
flags, bandwidth, dconn, graphicsuri,
|
||||||
nmigrate_disks, migrate_disks, compression);
|
nmigrate_disks, migrate_disks, compression,
|
||||||
|
migParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Perform failed. Make sure Finish doesn't overwrite the error */
|
/* Perform failed. Make sure Finish doesn't overwrite the error */
|
||||||
@ -5576,6 +5629,7 @@ static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
|
|||||||
const char **migrate_disks,
|
const char **migrate_disks,
|
||||||
int nbdPort,
|
int nbdPort,
|
||||||
qemuMigrationCompressionPtr compression,
|
qemuMigrationCompressionPtr compression,
|
||||||
|
qemuMonitorMigrationParamsPtr migParams,
|
||||||
unsigned long flags,
|
unsigned long flags,
|
||||||
const char *dname,
|
const char *dname,
|
||||||
unsigned long resource,
|
unsigned long resource,
|
||||||
@ -5699,8 +5753,8 @@ static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
|
|||||||
ret = doPeer2PeerMigrate3(driver, sconn, dconn, dconnuri, vm, xmlin,
|
ret = doPeer2PeerMigrate3(driver, sconn, dconn, dconnuri, vm, xmlin,
|
||||||
persist_xml, dname, uri, graphicsuri,
|
persist_xml, dname, uri, graphicsuri,
|
||||||
listenAddress, nmigrate_disks, migrate_disks,
|
listenAddress, nmigrate_disks, migrate_disks,
|
||||||
nbdPort, compression, resource, useParams,
|
nbdPort, compression, migParams, resource,
|
||||||
flags);
|
useParams, flags);
|
||||||
} else {
|
} else {
|
||||||
ret = doPeer2PeerMigrate2(driver, sconn, dconn, vm,
|
ret = doPeer2PeerMigrate2(driver, sconn, dconn, vm,
|
||||||
dconnuri, flags, dname, resource);
|
dconnuri, flags, dname, resource);
|
||||||
@ -5740,6 +5794,7 @@ qemuMigrationPerformJob(virQEMUDriverPtr driver,
|
|||||||
const char **migrate_disks,
|
const char **migrate_disks,
|
||||||
int nbdPort,
|
int nbdPort,
|
||||||
qemuMigrationCompressionPtr compression,
|
qemuMigrationCompressionPtr compression,
|
||||||
|
qemuMonitorMigrationParamsPtr migParams,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
char **cookieout,
|
char **cookieout,
|
||||||
@ -5776,13 +5831,14 @@ qemuMigrationPerformJob(virQEMUDriverPtr driver,
|
|||||||
ret = doPeer2PeerMigrate(driver, conn, vm, xmlin, persist_xml,
|
ret = doPeer2PeerMigrate(driver, conn, vm, xmlin, persist_xml,
|
||||||
dconnuri, uri, graphicsuri, listenAddress,
|
dconnuri, uri, graphicsuri, listenAddress,
|
||||||
nmigrate_disks, migrate_disks, nbdPort,
|
nmigrate_disks, migrate_disks, nbdPort,
|
||||||
compression, flags, dname, resource, &v3proto);
|
compression, migParams, flags, dname, resource,
|
||||||
|
&v3proto);
|
||||||
} else {
|
} else {
|
||||||
qemuMigrationJobSetPhase(driver, vm, QEMU_MIGRATION_PHASE_PERFORM2);
|
qemuMigrationJobSetPhase(driver, vm, QEMU_MIGRATION_PHASE_PERFORM2);
|
||||||
ret = doNativeMigrate(driver, vm, persist_xml, uri, cookiein, cookieinlen,
|
ret = doNativeMigrate(driver, vm, persist_xml, uri, cookiein, cookieinlen,
|
||||||
cookieout, cookieoutlen,
|
cookieout, cookieoutlen,
|
||||||
flags, resource, NULL, NULL, 0, NULL,
|
flags, resource, NULL, NULL, 0, NULL,
|
||||||
compression);
|
compression, migParams);
|
||||||
}
|
}
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
@ -5845,6 +5901,7 @@ qemuMigrationPerformPhase(virQEMUDriverPtr driver,
|
|||||||
size_t nmigrate_disks,
|
size_t nmigrate_disks,
|
||||||
const char **migrate_disks,
|
const char **migrate_disks,
|
||||||
qemuMigrationCompressionPtr compression,
|
qemuMigrationCompressionPtr compression,
|
||||||
|
qemuMonitorMigrationParamsPtr migParams,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
char **cookieout,
|
char **cookieout,
|
||||||
@ -5870,7 +5927,7 @@ qemuMigrationPerformPhase(virQEMUDriverPtr driver,
|
|||||||
ret = doNativeMigrate(driver, vm, persist_xml, uri, cookiein, cookieinlen,
|
ret = doNativeMigrate(driver, vm, persist_xml, uri, cookiein, cookieinlen,
|
||||||
cookieout, cookieoutlen,
|
cookieout, cookieoutlen,
|
||||||
flags, resource, NULL, graphicsuri,
|
flags, resource, NULL, graphicsuri,
|
||||||
nmigrate_disks, migrate_disks, compression);
|
nmigrate_disks, migrate_disks, compression, migParams);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (qemuMigrationRestoreDomainState(conn, vm)) {
|
if (qemuMigrationRestoreDomainState(conn, vm)) {
|
||||||
@ -5915,6 +5972,7 @@ qemuMigrationPerform(virQEMUDriverPtr driver,
|
|||||||
const char **migrate_disks,
|
const char **migrate_disks,
|
||||||
int nbdPort,
|
int nbdPort,
|
||||||
qemuMigrationCompressionPtr compression,
|
qemuMigrationCompressionPtr compression,
|
||||||
|
qemuMonitorMigrationParamsPtr migParams,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
char **cookieout,
|
char **cookieout,
|
||||||
@ -5945,7 +6003,8 @@ qemuMigrationPerform(virQEMUDriverPtr driver,
|
|||||||
return qemuMigrationPerformJob(driver, conn, vm, xmlin, persist_xml, dconnuri, uri,
|
return qemuMigrationPerformJob(driver, conn, vm, xmlin, persist_xml, dconnuri, uri,
|
||||||
graphicsuri, listenAddress,
|
graphicsuri, listenAddress,
|
||||||
nmigrate_disks, migrate_disks, nbdPort,
|
nmigrate_disks, migrate_disks, nbdPort,
|
||||||
compression, cookiein, cookieinlen,
|
compression, migParams,
|
||||||
|
cookiein, cookieinlen,
|
||||||
cookieout, cookieoutlen,
|
cookieout, cookieoutlen,
|
||||||
flags, dname, resource, v3proto);
|
flags, dname, resource, v3proto);
|
||||||
} else {
|
} else {
|
||||||
@ -5959,14 +6018,16 @@ qemuMigrationPerform(virQEMUDriverPtr driver,
|
|||||||
return qemuMigrationPerformPhase(driver, conn, vm, persist_xml, uri,
|
return qemuMigrationPerformPhase(driver, conn, vm, persist_xml, uri,
|
||||||
graphicsuri,
|
graphicsuri,
|
||||||
nmigrate_disks, migrate_disks,
|
nmigrate_disks, migrate_disks,
|
||||||
compression, cookiein, cookieinlen,
|
compression, migParams,
|
||||||
|
cookiein, cookieinlen,
|
||||||
cookieout, cookieoutlen,
|
cookieout, cookieoutlen,
|
||||||
flags, resource);
|
flags, resource);
|
||||||
} else {
|
} else {
|
||||||
return qemuMigrationPerformJob(driver, conn, vm, xmlin, persist_xml, NULL,
|
return qemuMigrationPerformJob(driver, conn, vm, xmlin, persist_xml, NULL,
|
||||||
uri, graphicsuri, listenAddress,
|
uri, graphicsuri, listenAddress,
|
||||||
nmigrate_disks, migrate_disks, nbdPort,
|
nmigrate_disks, migrate_disks, nbdPort,
|
||||||
compression, cookiein, cookieinlen,
|
compression, migParams,
|
||||||
|
cookiein, cookieinlen,
|
||||||
cookieout, cookieoutlen, flags,
|
cookieout, cookieoutlen, flags,
|
||||||
dname, resource, v3proto);
|
dname, resource, v3proto);
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,8 @@ typedef qemuMigrationCompression *qemuMigrationCompressionPtr;
|
|||||||
VIR_MIGRATE_PARAM_COMPRESSION_MT_DTHREADS, VIR_TYPED_PARAM_INT, \
|
VIR_MIGRATE_PARAM_COMPRESSION_MT_DTHREADS, VIR_TYPED_PARAM_INT, \
|
||||||
VIR_MIGRATE_PARAM_COMPRESSION_XBZRLE_CACHE, VIR_TYPED_PARAM_ULLONG, \
|
VIR_MIGRATE_PARAM_COMPRESSION_XBZRLE_CACHE, VIR_TYPED_PARAM_ULLONG, \
|
||||||
VIR_MIGRATE_PARAM_PERSIST_XML, VIR_TYPED_PARAM_STRING, \
|
VIR_MIGRATE_PARAM_PERSIST_XML, VIR_TYPED_PARAM_STRING, \
|
||||||
|
VIR_MIGRATE_PARAM_AUTO_CONVERGE_INITIAL, VIR_TYPED_PARAM_INT, \
|
||||||
|
VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT, VIR_TYPED_PARAM_INT, \
|
||||||
NULL
|
NULL
|
||||||
|
|
||||||
|
|
||||||
@ -118,6 +120,11 @@ int qemuMigrationCompressionDump(qemuMigrationCompressionPtr compression,
|
|||||||
int *maxparams,
|
int *maxparams,
|
||||||
unsigned long *flags);
|
unsigned long *flags);
|
||||||
|
|
||||||
|
qemuMonitorMigrationParamsPtr
|
||||||
|
qemuMigrationParams(virTypedParameterPtr params,
|
||||||
|
int nparams,
|
||||||
|
unsigned long flags);
|
||||||
|
|
||||||
int qemuMigrationJobStart(virQEMUDriverPtr driver,
|
int qemuMigrationJobStart(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
qemuDomainAsyncJob job)
|
qemuDomainAsyncJob job)
|
||||||
@ -197,6 +204,7 @@ int qemuMigrationPerform(virQEMUDriverPtr driver,
|
|||||||
const char **migrate_disks,
|
const char **migrate_disks,
|
||||||
int nbdPort,
|
int nbdPort,
|
||||||
qemuMigrationCompressionPtr compression,
|
qemuMigrationCompressionPtr compression,
|
||||||
|
qemuMonitorMigrationParamsPtr migParams,
|
||||||
const char *cookiein,
|
const char *cookiein,
|
||||||
int cookieinlen,
|
int cookieinlen,
|
||||||
char **cookieout,
|
char **cookieout,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user