mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: dump: Resume CPUs only when the VM is still alive
Check if the VM is alive after we possibly called into monitor to reset the guest.
This commit is contained in:
parent
736ea71bf6
commit
692c4ea673
@ -3681,15 +3681,17 @@ qemuDomainCoreDumpWithFormat(virDomainPtr dom,
|
|||||||
qemuDomainObjExitMonitor(driver, vm);
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resume && qemuProcessStartCPUs(driver, vm, dom->conn,
|
if (resume && virDomainObjIsActive(vm)) {
|
||||||
VIR_DOMAIN_RUNNING_UNPAUSED,
|
if (qemuProcessStartCPUs(driver, vm, dom->conn,
|
||||||
QEMU_ASYNC_JOB_DUMP) < 0) {
|
VIR_DOMAIN_RUNNING_UNPAUSED,
|
||||||
event = virDomainEventLifecycleNewFromObj(vm,
|
QEMU_ASYNC_JOB_DUMP) < 0) {
|
||||||
VIR_DOMAIN_EVENT_SUSPENDED,
|
event = virDomainEventLifecycleNewFromObj(vm,
|
||||||
VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR);
|
VIR_DOMAIN_EVENT_SUSPENDED,
|
||||||
if (virGetLastError() == NULL)
|
VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR);
|
||||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
if (virGetLastError() == NULL)
|
||||||
"%s", _("resuming after dump failed"));
|
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||||
|
"%s", _("resuming after dump failed"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user