mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 13:57:43 +03:00
qemu: migration: Skip few checks while doing offline migration
qemuMigrationIsAllowed would disallow offline migration if the VM contained host devices or memory modules. Since during offline migration we don't transfer any state we can safely migrate VMs with such configuration. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1265049
This commit is contained in:
parent
b6c44af0f7
commit
01b4baba59
@ -2208,12 +2208,6 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver,
|
||||
int pauseReason;
|
||||
size_t i;
|
||||
|
||||
if (qemuProcessAutoDestroyActive(driver, vm)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||
"%s", _("domain is marked for auto destroy"));
|
||||
return false;
|
||||
}
|
||||
|
||||
/* perform these checks only when migrating to remote hosts */
|
||||
if (remote) {
|
||||
nsnapshots = virDomainSnapshotObjListNum(vm->snapshots, NULL, 0);
|
||||
@ -2229,6 +2223,7 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver,
|
||||
|
||||
/* cancel migration if disk I/O error is emitted while migrating */
|
||||
if (flags & VIR_MIGRATE_ABORT_ON_ERROR &&
|
||||
!(flags & VIR_MIGRATE_OFFLINE) &&
|
||||
virDomainObjGetState(vm, &pauseReason) == VIR_DOMAIN_PAUSED &&
|
||||
pauseReason == VIR_DOMAIN_PAUSED_IOERROR) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
@ -2238,6 +2233,15 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver,
|
||||
|
||||
}
|
||||
|
||||
/* following checks don't make sense for offline migration */
|
||||
if (!(flags & VIR_MIGRATE_OFFLINE)) {
|
||||
if (qemuProcessAutoDestroyActive(driver, vm)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||
"%s", _("domain is marked for auto destroy"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (qemuDomainHasBlockjob(vm, false)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("domain has an active block job"));
|
||||
@ -2277,6 +2281,7 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver,
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user