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;
|
update_current = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!virDomainObjIsActive(vm)) {
|
if (!redefine) {
|
||||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
if (!virDomainObjIsActive(vm)) {
|
||||||
_("cannot create checkpoint for inactive domain"));
|
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||||
return NULL;
|
_("cannot create checkpoint for inactive domain"));
|
||||||
}
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
||||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||||
_("incremental backup is not supported yet"));
|
_("incremental backup is not supported yet"));
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(def = virDomainCheckpointDefParseString(xmlDesc, driver->xmlopt,
|
if (!(def = virDomainCheckpointDefParseString(xmlDesc, driver->xmlopt,
|
||||||
|
|
Loading…
Reference in New Issue