提交 daf01a61 编写于 作者: M Martin Kletzander

qemu: Fix domain state after reset

When reset was called from a domain that crashed we didn't change the
crashed state into a paused one which could confuse users.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1269575Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 ff498a9a
......@@ -2139,6 +2139,7 @@ qemuDomainReset(virDomainPtr dom, unsigned int flags)
virDomainObjPtr vm;
int ret = -1;
qemuDomainObjPrivatePtr priv;
virDomainState state;
virCheckFlags(0, -1);
......@@ -2165,6 +2166,10 @@ qemuDomainReset(virDomainPtr dom, unsigned int flags)
priv->fakeReboot = false;
state = virDomainObjGetState(vm, NULL);
if (state == VIR_DOMAIN_CRASHED)
virDomainObjSetState(vm, VIR_DOMAIN_PAUSED, VIR_DOMAIN_PAUSED_CRASHED);
endjob:
qemuDomainObjEndJob(driver, vm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册