mirror of https://gitee.com/openkylin/libvirt.git
qemu: checkpoint: Allow checkpoint redefine for offline VMs
Skip the liveness and capability checks when redefining checkpoints as we don't need qemu interactions to update the metadata. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
a743583e4f
commit
135a0b3f71
|
@ -647,16 +647,18 @@ qemuCheckpointCreateXML(virDomainPtr domain,
|
|||
update_current = false;
|
||||
}
|
||||
|
||||
if (!virDomainObjIsActive(vm)) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("cannot create checkpoint for inactive domain"));
|
||||
return NULL;
|
||||
}
|
||||
if (!redefine) {
|
||||
if (!virDomainObjIsActive(vm)) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("cannot create checkpoint for inactive domain"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("incremental backup is not supported yet"));
|
||||
return NULL;
|
||||
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("incremental backup is not supported yet"));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(def = virDomainCheckpointDefParseString(xmlDesc, driver->xmlopt,
|
||||
|
|
Loading…
Reference in New Issue