mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
qemu: Allow ACPI shutdown only for running domains
If the domain is not running, but for example the CPUs are stopped, the ACPI event gets queued and resume of the domain will just shut it off. https://bugzilla.redhat.com/show_bug.cgi?id=1216281 Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
a781eae8c1
commit
b842741ba4
@ -2042,7 +2042,7 @@ static int qemuDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
|
||||
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!virDomainObjIsActive(vm)) {
|
||||
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_RUNNING) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||
"%s", _("domain is not running"));
|
||||
goto endjob;
|
||||
|
Loading…
x
Reference in New Issue
Block a user