mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 09:55:18 +00:00
qemuCheckpointDelete: 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=1812531 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
8b41b21aee
commit
e05dd1abdc
@ -771,17 +771,17 @@ qemuCheckpointDelete(virDomainObjPtr vm,
|
||||
return -1;
|
||||
|
||||
if (!metadata_only) {
|
||||
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("incremental backup is not supported yet"));
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
if (!virDomainObjIsActive(vm)) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("cannot delete checkpoint for inactive domain"));
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("incremental backup is not supported yet"));
|
||||
goto endjob;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(chk = qemuCheckpointObjFromCheckpoint(vm, checkpoint)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user