mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 04:25:19 +00:00
checkpoint: Introduce VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE flag
Introduce a flag which will allow users to perform hypervisor-specific validation when redefining the checkpoint metadata. This will allow checking metadata which is stored e.g. in disk images when populating the libvirt metadata. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
e33e89d839
commit
9b54eb84c8
@ -57,6 +57,8 @@ typedef enum {
|
|||||||
quiesce all mounted
|
quiesce all mounted
|
||||||
file systems within
|
file systems within
|
||||||
the domain */
|
the domain */
|
||||||
|
VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE = (1 << 2), /* validate disk data state
|
||||||
|
when redefining a checkpoint */
|
||||||
} virDomainCheckpointCreateFlags;
|
} virDomainCheckpointCreateFlags;
|
||||||
|
|
||||||
/* Create a checkpoint using the current VM state. */
|
/* Create a checkpoint using the current VM state. */
|
||||||
|
@ -125,6 +125,11 @@ virDomainCheckpointGetConnect(virDomainCheckpointPtr checkpoint)
|
|||||||
* has a way to resupply correct defaults). Not all hypervisors support
|
* has a way to resupply correct defaults). Not all hypervisors support
|
||||||
* this flag.
|
* this flag.
|
||||||
*
|
*
|
||||||
|
* If @flags includes VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE along with
|
||||||
|
* VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE the state of the metadata related
|
||||||
|
* to the disk state of the redefined checkpoint is validated. Note that
|
||||||
|
* hypervisors may require that the @domain is running to perform validation.
|
||||||
|
*
|
||||||
* If @flags includes VIR_DOMAIN_CHECKPOINT_CREATE_QUIESCE, then the
|
* If @flags includes VIR_DOMAIN_CHECKPOINT_CREATE_QUIESCE, then the
|
||||||
* libvirt will attempt to use guest agent to freeze and thaw all file
|
* libvirt will attempt to use guest agent to freeze and thaw all file
|
||||||
* systems in use within domain OS. However, if the guest agent is not
|
* systems in use within domain OS. However, if the guest agent is not
|
||||||
@ -155,6 +160,10 @@ virDomainCheckpointCreateXML(virDomainPtr domain,
|
|||||||
VIR_DOMAIN_CHECKPOINT_CREATE_QUIESCE,
|
VIR_DOMAIN_CHECKPOINT_CREATE_QUIESCE,
|
||||||
error);
|
error);
|
||||||
|
|
||||||
|
VIR_REQUIRE_FLAG_GOTO(VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE,
|
||||||
|
VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE,
|
||||||
|
error);
|
||||||
|
|
||||||
if (conn->driver->domainCheckpointCreateXML) {
|
if (conn->driver->domainCheckpointCreateXML) {
|
||||||
virDomainCheckpointPtr ret;
|
virDomainCheckpointPtr ret;
|
||||||
ret = conn->driver->domainCheckpointCreateXML(domain, xmlDesc, flags);
|
ret = conn->driver->domainCheckpointCreateXML(domain, xmlDesc, flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user