提交 692c4ea6 编写于 作者: P Peter Krempa

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.
上级 736ea71b
...@@ -3681,7 +3681,8 @@ qemuDomainCoreDumpWithFormat(virDomainPtr dom, ...@@ -3681,7 +3681,8 @@ qemuDomainCoreDumpWithFormat(virDomainPtr dom,
qemuDomainObjExitMonitor(driver, vm); qemuDomainObjExitMonitor(driver, vm);
} }
if (resume && qemuProcessStartCPUs(driver, vm, dom->conn, if (resume && virDomainObjIsActive(vm)) {
if (qemuProcessStartCPUs(driver, vm, dom->conn,
VIR_DOMAIN_RUNNING_UNPAUSED, VIR_DOMAIN_RUNNING_UNPAUSED,
QEMU_ASYNC_JOB_DUMP) < 0) { QEMU_ASYNC_JOB_DUMP) < 0) {
event = virDomainEventLifecycleNewFromObj(vm, event = virDomainEventLifecycleNewFromObj(vm,
...@@ -3692,6 +3693,7 @@ qemuDomainCoreDumpWithFormat(virDomainPtr dom, ...@@ -3692,6 +3693,7 @@ qemuDomainCoreDumpWithFormat(virDomainPtr dom,
"%s", _("resuming after dump failed")); "%s", _("resuming after dump failed"));
} }
} }
}
if (qemuDomainObjEndAsyncJob(driver, vm) == 0) { if (qemuDomainObjEndAsyncJob(driver, vm) == 0) {
vm = NULL; vm = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册