1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

virsh: checkpoint-create: Add support for VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2020-11-03 12:49:11 +01:00
parent 9b54eb84c8
commit f37d306f6e
2 changed files with 14 additions and 1 deletions

View File

@ -7143,7 +7143,7 @@ checkpoint-create
::
checkpoint-create domain [xmlfile] { --redefine | [--quiesce]}
checkpoint-create domain [xmlfile] { --redefine [--redefine-validate] | [--quiesce]}
Create a checkpoint for domain *domain* with the properties specified
in *xmlfile* describing a <domaincheckpoint> top-level element. The
@ -7161,6 +7161,11 @@ alterations in the checkpoint metadata (such as host-specific aspects
of the domain XML embedded in the checkpoint). When this flag is
supplied, the *xmlfile* argument is mandatory.
If *--redefine-validate* is specified along with *--redefine* the hypervisor
performs validation of metadata associated with the checkpoint stored in places
besides the checkpoint XML. Note that some hypervisors may require that the
domain is running to perform validation.
If *--quiesce* is specified, libvirt will try to use guest agent
to freeze and unfreeze domain's mounted file systems. However,
if domain has no guest agent, checkpoint creation will fail.

View File

@ -99,6 +99,10 @@ static const vshCmdOptDef opts_checkpoint_create[] = {
.type = VSH_OT_BOOL,
.help = N_("redefine metadata for existing checkpoint")
},
{.name = "redefine-validate",
.type = VSH_OT_BOOL,
.help = N_("validate the redefined checkpoint")
},
{.name = "quiesce",
.type = VSH_OT_BOOL,
.help = N_("quiesce guest's file systems")
@ -116,8 +120,12 @@ cmdCheckpointCreate(vshControl *ctl,
char *buffer = NULL;
unsigned int flags = 0;
VSH_REQUIRE_OPTION("redefine-validate", "redefine");
if (vshCommandOptBool(cmd, "redefine"))
flags |= VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE;
if (vshCommandOptBool(cmd, "redefine-validate"))
flags |= VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE;
if (vshCommandOptBool(cmd, "quiesce"))
flags |= VIR_DOMAIN_CHECKPOINT_CREATE_QUIESCE;