mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
qemu: Avoid removing persistent config if migration fails
When migration fails in qemuMigrationPrepareAny, we unconditionally call
qemuDomainRemoveInactive, which should only be called for transient
domains. The check for !vm->persistent was accidentally removed by
commit 540c339
.
Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
84d0286ef0
commit
09444724bc
@ -3432,7 +3432,8 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
|
||||
VIR_FREE(priv->origname);
|
||||
virPortAllocatorRelease(driver->migrationPorts, priv->nbdPort);
|
||||
priv->nbdPort = 0;
|
||||
qemuDomainRemoveInactive(driver, vm);
|
||||
if (!vm->persistent)
|
||||
qemuDomainRemoveInactive(driver, vm);
|
||||
}
|
||||
virDomainObjEndAPI(&vm);
|
||||
if (event)
|
||||
|
Loading…
Reference in New Issue
Block a user