[libvirt] [PATCH 2/4] qemu: snapshot: Forbid partial internal snapshots

Ján Tomko jtomko at redhat.com
Tue May 20 14:03:36 UTC 2014


On 05/20/2014 03:36 PM, Peter Krempa wrote:
> qemu's savevm command does a snapshot of all non readonly disks of a VM.
> Libvirt though allowed disabling snapshot for certain disk of a VM.
> ---
>  src/qemu/qemu_driver.c | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index aa07ef6..e6b6648 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c

> @@ -12699,12 +12703,13 @@ qemuDomainSnapshotPrepare(virConnectPtr conn,
>          }
>      }
> 
> -    /* internal snapshot requires a disk image to store the memory image to */
> -    if (def->memory == VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL &&
> -        !found_internal) {
> +    /* internal snapshot requires a disk image to store the memory image to and
> +     * also disks can't be excluded from a internal snapshot*/

s/a internal snapshot/an internal snapshot /

> +    if ((def->memory == VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL && !found_internal) ||
> +        (found_internal && forbid_internal)) {
>          virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> -                       _("internal checkpoints require at least "
> -                         "one disk to be selected for snapshot"));
> +                       _("internal snapshots and checkpoints require all "
> +                         "disks to be selected for snapshot"));
>          goto cleanup;
>      }
> 

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140520/9ff0a75d/attachment-0001.sig>


More information about the libvir-list mailing list