提交 09444724 编写于 作者: L Luyao Huang 提交者: Jiri Denemark

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 540c339a.
Signed-off-by: NLuyao Huang <lhuang@redhat.com>
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 84d0286e
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册