mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 09:14:57 +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,7 +3681,8 @@ qemuDomainCoreDumpWithFormat(virDomainPtr dom,
|
||||
qemuDomainObjExitMonitor(driver, vm);
|
||||
}
|
||||
|
||||
if (resume && qemuProcessStartCPUs(driver, vm, dom->conn,
|
||||
if (resume && virDomainObjIsActive(vm)) {
|
||||
if (qemuProcessStartCPUs(driver, vm, dom->conn,
|
||||
VIR_DOMAIN_RUNNING_UNPAUSED,
|
||||
QEMU_ASYNC_JOB_DUMP) < 0) {
|
||||
event = virDomainEventLifecycleNewFromObj(vm,
|
||||
@ -3692,6 +3693,7 @@ qemuDomainCoreDumpWithFormat(virDomainPtr dom,
|
||||
"%s", _("resuming after dump failed"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (qemuDomainObjEndAsyncJob(driver, vm) == 0) {
|
||||
vm = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user