From 366a3d52ee6cf7b37f7e77cd3c13aff2915e5544 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 25 Jan 2013 11:50:43 +0100 Subject: [PATCH] snapshot: Mention disk-only snapshots in error message 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 | 3 ++- tools/virsh.pod | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 0c5b0057d2..fe77bd0440 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -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; diff --git a/tools/virsh.pod b/tools/virsh.pod index fd0f762abb..ec1772d3f9 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -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 of the form B<[file=]name[,snapshot=type]>, where type can be B, B, or B. To include a literal -comma in B, escape it with a second comma. +comma in B, 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