Commit 4257c203 authored by Peter Krempa's avatar Peter Krempa

qemuCheckpointCreateXML: Check VM liveness first

Move the liveness check prior to the capability check. If the VM is
offline the capabilities are not initialized and thus we'd report the
wrong error.

https://bugzilla.redhat.com/show_bug.cgi?id=1812531Signed-off-by: Peter Krempa's avatarPeter Krempa <[email protected]>
Reviewed-by: Eric Blake's avatarEric Blake <[email protected]>
parent e060b062
......@@ -647,15 +647,15 @@ qemuCheckpointCreateXML(virDomainPtr domain,
update_current = false;
}
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("incremental backup is not supported yet"));
_("cannot create checkpoint for inactive domain"));
return NULL;
}
if (!virDomainObjIsActive(vm)) {
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot create checkpoint for inactive domain"));
_("incremental backup is not supported yet"));
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment