mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
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
This commit is contained in:
parent
e3f5af6a5f
commit
3fe9f61d54
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user