mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
parent
9b54eb84c8
commit
f37d306f6e
@ -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
|
Create a checkpoint for domain *domain* with the properties specified
|
||||||
in *xmlfile* describing a <domaincheckpoint> top-level element. The
|
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
|
of the domain XML embedded in the checkpoint). When this flag is
|
||||||
supplied, the *xmlfile* argument is mandatory.
|
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
|
If *--quiesce* is specified, libvirt will try to use guest agent
|
||||||
to freeze and unfreeze domain's mounted file systems. However,
|
to freeze and unfreeze domain's mounted file systems. However,
|
||||||
if domain has no guest agent, checkpoint creation will fail.
|
if domain has no guest agent, checkpoint creation will fail.
|
||||||
|
@ -99,6 +99,10 @@ static const vshCmdOptDef opts_checkpoint_create[] = {
|
|||||||
.type = VSH_OT_BOOL,
|
.type = VSH_OT_BOOL,
|
||||||
.help = N_("redefine metadata for existing checkpoint")
|
.help = N_("redefine metadata for existing checkpoint")
|
||||||
},
|
},
|
||||||
|
{.name = "redefine-validate",
|
||||||
|
.type = VSH_OT_BOOL,
|
||||||
|
.help = N_("validate the redefined checkpoint")
|
||||||
|
},
|
||||||
{.name = "quiesce",
|
{.name = "quiesce",
|
||||||
.type = VSH_OT_BOOL,
|
.type = VSH_OT_BOOL,
|
||||||
.help = N_("quiesce guest's file systems")
|
.help = N_("quiesce guest's file systems")
|
||||||
@ -116,8 +120,12 @@ cmdCheckpointCreate(vshControl *ctl,
|
|||||||
char *buffer = NULL;
|
char *buffer = NULL;
|
||||||
unsigned int flags = 0;
|
unsigned int flags = 0;
|
||||||
|
|
||||||
|
VSH_REQUIRE_OPTION("redefine-validate", "redefine");
|
||||||
|
|
||||||
if (vshCommandOptBool(cmd, "redefine"))
|
if (vshCommandOptBool(cmd, "redefine"))
|
||||||
flags |= VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE;
|
flags |= VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE;
|
||||||
|
if (vshCommandOptBool(cmd, "redefine-validate"))
|
||||||
|
flags |= VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE;
|
||||||
if (vshCommandOptBool(cmd, "quiesce"))
|
if (vshCommandOptBool(cmd, "quiesce"))
|
||||||
flags |= VIR_DOMAIN_CHECKPOINT_CREATE_QUIESCE;
|
flags |= VIR_DOMAIN_CHECKPOINT_CREATE_QUIESCE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user