mirror of https://gitee.com/openkylin/libvirt.git
qemuMigrationSrcConfirm: Don't remove domain config if confirm phase fails
If migration is cancelled or confirm phase fails the domain should be kept on the source even if VIR_MIGRATE_UNDEFINE_SOURCE was requested. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
ee32939fff
commit
fd54e4fdc8
|
@ -3044,7 +3044,7 @@ qemuMigrationSrcConfirm(virQEMUDriverPtr driver,
|
|||
|
||||
qemuMigrationJobFinish(driver, vm);
|
||||
if (!virDomainObjIsActive(vm)) {
|
||||
if (flags & VIR_MIGRATE_UNDEFINE_SOURCE) {
|
||||
if (!cancelled && ret == 0 && flags & VIR_MIGRATE_UNDEFINE_SOURCE) {
|
||||
virDomainDeleteConfig(cfg->configDir, cfg->autostartDir, vm);
|
||||
vm->persistent = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue