VIR_DOMAIN_PAUSED_WATCHDOG = 6, /* paused due to a watchdog event */
VIR_DOMAIN_PAUSED_FROM_SNAPSHOT = 7, /* paused after restoring from snapshot */
VIR_DOMAIN_PAUSED_SHUTTING_DOWN = 8, /* paused during shutdown process */
+ VIR_DOMAIN_PAUSED_SNAPSHOT = 9, /* paused while creating a snapshot */
#ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_PAUSED_LAST
the domain */
VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC = (1 << 7), /* atomically avoid
partial changes */
+ VIR_DOMAIN_SNAPSHOT_CREATE_LIVE = (1 << 8), /* create the snapshot
+ while the guest is
+ running */
} virDomainSnapshotCreateFlags;
/* Take a snapshot of the current VM state */
* running after the snapshot. This flag is invalid on transient domains,
* and is incompatible with VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE.
*
+ * If @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_LIVE, then the domain
+ * is not paused while creating the snapshot. This increases the size
+ * of the memory dump file, but reduces downtime of the guest while
+ * taking the snapshot. Some hypervisors only support this flag during
+ * external checkpoints.
+ *
* If @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY, then the
* snapshot will be limited to the disks described in @xmlDesc, and no
* VM state will be saved. For an active guest, the disk image may be
return N_("from snapshot");
case VIR_DOMAIN_PAUSED_SHUTTING_DOWN:
return N_("shutting down");
+ case VIR_DOMAIN_PAUSED_SNAPSHOT:
+ return N_("creating snapshot");
case VIR_DOMAIN_PAUSED_UNKNOWN:
case VIR_DOMAIN_PAUSED_LAST:
;
{"reuse-external", VSH_OT_BOOL, 0, N_("reuse any existing external files")},
{"quiesce", VSH_OT_BOOL, 0, N_("quiesce guest's file systems")},
{"atomic", VSH_OT_BOOL, 0, N_("require atomic operation")},
+ {"live", VSH_OT_BOOL, 0, N_("take a live snapshot")},
{NULL, 0, 0, NULL}
};
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE;
if (vshCommandOptBool(cmd, "atomic"))
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC;
+ if (vshCommandOptBool(cmd, "live"))
+ flags |= VIR_DOMAIN_SNAPSHOT_CREATE_LIVE;
dom = vshCommandOptDomain(ctl, cmd, NULL);
if (dom == NULL)
{"reuse-external", VSH_OT_BOOL, 0, N_("reuse any existing external files")},
{"quiesce", VSH_OT_BOOL, 0, N_("quiesce guest's file systems")},
{"atomic", VSH_OT_BOOL, 0, N_("require atomic operation")},
+ {"live", VSH_OT_BOOL, 0, N_("take a live snapshot")},
{"diskspec", VSH_OT_ARGV, 0,
N_("disk attributes: disk[,snapshot=type][,driver=type][,file=name]")},
{NULL, 0, 0, NULL}
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE;
if (vshCommandOptBool(cmd, "atomic"))
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC;
+ if (vshCommandOptBool(cmd, "live"))
+ flags |= VIR_DOMAIN_SNAPSHOT_CREATE_LIVE;
dom = vshCommandOptDomain(ctl, cmd, NULL);
if (dom == NULL)
=item B<snapshot-create> I<domain> [I<xmlfile>] {[I<--redefine> [I<--current>]]
| [I<--no-metadata>] [I<--halt>] [I<--disk-only>] [I<--reuse-external>]
-[I<--quiesce>] [I<--atomic>]}
+[I<--quiesce>] [I<--atomic>] [I<--live>]}
Create a snapshot for domain I<domain> with the properties specified in
I<xmlfile>. Normally, the only properties settable for a domain snapshot
after partially performing the action, and B<dumpxml> must be used to
see whether any partial changes occurred.
+If I<--live> is specified, libvirt takes the snapshot while the guest is
+running. This increases the size of the memory image of the external
+checkpoint. This is currently supported only for external checkpoints.
+
Existence of snapshot metadata will prevent attempts to B<undefine>
a persistent domain. However, for transient domains, snapshot
metadata is silently lost when the domain quits running (whether
=item B<snapshot-create-as> I<domain> {[I<--print-xml>]
| [I<--no-metadata>] [I<--halt>] [I<--reuse-external>]} [I<name>]
[I<description>] [I<--disk-only> [I<--quiesce>] [I<--atomic>]
-[[I<--diskspec>] B<diskspec>]...]
+[I<--live>] [[I<--diskspec>] B<diskspec>]...]
Create a snapshot for domain I<domain> with the given <name> and
<description>; if either value is omitted, libvirt will choose a
after partially performing the action, and B<dumpxml> must be used to
see whether any partial changes occurred.
+If I<--live> is specified, libvirt takes the snapshot while the guest is
+running. This increases the size of the memory image of the external
+checkpoint. This is currently supported only for external checkpoints.
+
=item B<snapshot-current> I<domain> {[I<--name>] | [I<--security-info>]
| [I<snapshotname>]}