mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
qemu: Error prompt when managed save a shutoff domain
The problem was introduced by commit 4303c91
, which removed the checking
of domain state, this patch is to fix it.
Otherwise, improper error will be thrown, e.g.
error: Failed to save domain rhel6 state
error: cannot resolve symlink /var/lib/libvirt/qemu/save/rhel6.save: No such
file or directory
This commit is contained in:
parent
6cbab7c159
commit
dbd63c4d63
@ -4640,6 +4640,12 @@ qemuDomainManagedSave(virDomainPtr dom, unsigned int flags)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!virDomainObjIsActive(vm)) {
|
||||
qemuReportError(VIR_ERR_OPERATION_INVALID,
|
||||
"%s", _("domain is not running"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
name = qemuDomainManagedSavePath(driver, vm);
|
||||
if (name == NULL)
|
||||
goto cleanup;
|
||||
|
Loading…
Reference in New Issue
Block a user