提交 3fe9f61d 编写于 作者: P Peter Krempa

qemu: managedsave: Check that VM is alive after entering async job

Saving a shutoff VM doesn't make sense and libvirtd crashes while
attempting to do that. Check that the domain is alive after entering
the save async job.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1129207
上级 e3f5af6a
......@@ -3096,6 +3096,12 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver, virDomainPtr dom,
if (qemuDomainObjBeginAsyncJob(driver, vm, QEMU_ASYNC_JOB_SAVE) < 0)
goto cleanup;
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("guest unexpectedly quit"));
goto endjob;
}
memset(&priv->job.info, 0, sizeof(priv->job.info));
priv->job.info.type = VIR_DOMAIN_JOB_UNBOUNDED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册