mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +00:00
qemu: fix migration flags undefinesource cannot work
In commit f41be296
, we moved vm->persistent check into
qemuDomainRemoveInactive, but we didn't change the vm->persistent
before call qemuDomainRemoveInactive in some place before and just
call it to remove the inactive vm.
Signed-off-by: Luyao Huang <lhuang@redhat.com>
This commit is contained in:
parent
a98145e7c9
commit
926a98de21
@ -3912,8 +3912,10 @@ qemuMigrationConfirm(virConnectPtr conn,
|
||||
|
||||
qemuMigrationJobFinish(driver, vm);
|
||||
if (!virDomainObjIsActive(vm)) {
|
||||
if (flags & VIR_MIGRATE_UNDEFINE_SOURCE)
|
||||
if (flags & VIR_MIGRATE_UNDEFINE_SOURCE) {
|
||||
virDomainDeleteConfig(cfg->configDir, cfg->autostartDir, vm);
|
||||
vm->persistent = 0;
|
||||
}
|
||||
qemuDomainRemoveInactive(driver, vm);
|
||||
}
|
||||
|
||||
@ -5405,8 +5407,10 @@ qemuMigrationPerformJob(virQEMUDriverPtr driver,
|
||||
|
||||
qemuMigrationJobFinish(driver, vm);
|
||||
if (!virDomainObjIsActive(vm) && ret == 0) {
|
||||
if (flags & VIR_MIGRATE_UNDEFINE_SOURCE)
|
||||
if (flags & VIR_MIGRATE_UNDEFINE_SOURCE) {
|
||||
virDomainDeleteConfig(cfg->configDir, cfg->autostartDir, vm);
|
||||
vm->persistent = 0;
|
||||
}
|
||||
qemuDomainRemoveInactive(driver, vm);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user