mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
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=1269575 Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
ff498a9ac7
commit
daf01a6125
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user