mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-30 18:50:18 +03:00
qemu: Apply migration parameters in qemuMigrationDstRun
Similar to qemuMigrationSrcRun, apply migration parameters in qemuMigrationDstRun. This allows callers to create customized migration parameters, but delegates their application to the function performing the migration. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
5b324c0a73
commit
138737b203
@ -2428,7 +2428,10 @@ qemuMigrationDstGetURI(const char *migrateFrom,
|
||||
int
|
||||
qemuMigrationDstRun(virDomainObj *vm,
|
||||
const char *uri,
|
||||
virDomainAsyncJob asyncJob)
|
||||
virDomainAsyncJob asyncJob,
|
||||
qemuMigrationParams *migParams,
|
||||
unsigned int flags)
|
||||
|
||||
{
|
||||
virTristateBool exitOnError = VIR_TRISTATE_BOOL_ABSENT;
|
||||
qemuDomainObjPrivate *priv = vm->privateData;
|
||||
@ -2436,6 +2439,10 @@ qemuMigrationDstRun(virDomainObj *vm,
|
||||
|
||||
VIR_DEBUG("Setting up incoming migration with URI %s", uri);
|
||||
|
||||
if (migParams && qemuMigrationParamsApply(vm, asyncJob,
|
||||
migParams, flags) < 0)
|
||||
return -1;
|
||||
|
||||
/* Ask QEMU not to exit on failure during incoming migration (if supported)
|
||||
* so that we can properly check and report error during Finish phase.
|
||||
*/
|
||||
@ -3366,10 +3373,6 @@ qemuMigrationDstPrepareActive(virQEMUDriver *driver,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (qemuMigrationParamsApply(vm, VIR_ASYNC_JOB_MIGRATION_IN,
|
||||
migParams, flags) < 0)
|
||||
goto error;
|
||||
|
||||
if (mig->nbd &&
|
||||
flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC)) {
|
||||
const char *nbdTLSAlias = NULL;
|
||||
@ -3401,7 +3404,8 @@ qemuMigrationDstPrepareActive(virQEMUDriver *driver,
|
||||
}
|
||||
|
||||
if (qemuMigrationDstRun(vm, incoming->uri,
|
||||
VIR_ASYNC_JOB_MIGRATION_IN) < 0)
|
||||
VIR_ASYNC_JOB_MIGRATION_IN,
|
||||
migParams, flags) < 0)
|
||||
goto error;
|
||||
|
||||
if (qemuProcessFinishStartup(driver, vm, VIR_ASYNC_JOB_MIGRATION_IN,
|
||||
|
@ -283,7 +283,10 @@ qemuMigrationDstGetURI(const char *migrateFrom,
|
||||
int
|
||||
qemuMigrationDstRun(virDomainObj *vm,
|
||||
const char *uri,
|
||||
virDomainAsyncJob asyncJob);
|
||||
virDomainAsyncJob asyncJob,
|
||||
qemuMigrationParams *migParams,
|
||||
unsigned int flags);
|
||||
|
||||
|
||||
void
|
||||
qemuMigrationSrcPostcopyFailed(virDomainObj *vm);
|
||||
|
@ -8478,7 +8478,7 @@ qemuProcessStart(virConnectPtr conn,
|
||||
relabel = true;
|
||||
|
||||
if (incoming) {
|
||||
if (qemuMigrationDstRun(vm, incoming->uri, asyncJob) < 0)
|
||||
if (qemuMigrationDstRun(vm, incoming->uri, asyncJob, NULL, 0) < 0)
|
||||
goto stop;
|
||||
} else {
|
||||
/* Refresh state of devices from QEMU. During migration this happens
|
||||
|
Loading…
x
Reference in New Issue
Block a user