]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
snapshot: Mention disk-only snapshots in error message
authorPeter Krempa <pkrempa@redhat.com>
Fri, 25 Jan 2013 10:50:43 +0000 (11:50 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 30 Jan 2013 10:08:41 +0000 (11:08 +0100)
When a disk-only snapshot is requested the domain is treated as if it
was offline. This forbids to mix memory checkpoints with the DISK_ONLY
flag.

This patch improves the error message and mentions the restriction in
the virsh man page.

src/conf/snapshot_conf.c
tools/virsh.pod

index 0c5b0057d20f31d8f5b8770997e9abf90c96fdc5..fe77bd04408839eb7d88fd21193f66fd675ac6c5 100644 (file)
@@ -309,7 +309,8 @@ virDomainSnapshotDefParseString(const char *xmlStr,
     if (offline && def->memory &&
         def->memory != VIR_DOMAIN_SNAPSHOT_LOCATION_NONE) {
         virReportError(VIR_ERR_XML_ERROR, "%s",
-                       _("memory state cannot be saved with offline snapshot"));
+                       _("memory state cannot be saved with offline or "
+                         "disk-only snapshot"));
         goto cleanup;
     }
     def->file = memoryFile;
index fd0f762abb8dd2a59bb34cfb9552c991e4fad8d3..ec1772d3f9e71f10152fa52a1e86a9609876cb42 100644 (file)
@@ -2749,7 +2749,8 @@ The I<--memspec> option can be used to control whether a checkpoint
 is internal or external.  The I<--memspec> flag is mandatory, followed
 by a B<memspec> of the form B<[file=]name[,snapshot=type]>, where
 type can be B<none>, B<internal>, or B<external>.  To include a literal
-comma in B<file=name>, escape it with a second comma.
+comma in B<file=name>, escape it with a second comma. I<--memspec> cannot
+be used together with I<--disk-only>.
 
 The I<--diskspec> option can be used to control how I<--disk-only> and
 external checkpoints create external files.  This option can occur