Red Hat Bugzilla – Bug 874171
virsh should make external checkpoint creation easy
Last modified: 2013-02-21 02:26:10 EST
Description of problem: As of the code committed for bug 638512, it is possible to create external checkpoints via hand-written XML and 'virsh snapshot-create', but not possible to use the convenience method 'virsh snapshot-create-as'. Version-Release number of selected component (if applicable): v0.10.2-7.el6 How reproducible: 100% Steps to Reproduce: 1. virsh snapshot-create-as $dom --memspec /path/to/file 2. 3. Actual results: error, --memspec is unsupported Expected results: create an external checkpoint with the memory state saved in /path/to/file Additional info: Upstream has this commit: commit 2cd4d8e506ae80742c29af07eed423cca163d58d Author: Eric Blake <eblake@redhat.com> Date: Tue Nov 6 20:55:53 2012 -0700 virsh: add snapshot-create-as memspec support External checkpoints could be created with snapshot-create, but without libvirt supplying a default name for the memory file, it is essential to add a new argument to snapshot-create-as to allow the user to choose the memory file name. This adds the option --memspec [file=]name[,snapshot=type], where type can be none, internal, or external. For an example, virsh snapshot-create-as $dom --memspec /path/to/file is the shortest possible command line for creating an external checkpoint, named after the current timestamp. * tools/virsh-snapshot.c (vshParseSnapshotMemspec): New function. (cmdSnapshotCreateAs): Use it. * tests/virsh-optparse (test_url): Test it. * tools/virsh.pod (snapshot-create-as): Document it.
In POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2012-November/msg00072.html
Verify this bug with libvirt-0.10.2-8.el6.x86_64 # virsh snapshot-create-as test ex-s3 --diskspec vda --memspec /tmp/ex-s3 Domain snapshot ex-s3 created # virsh snapshot-list test Name Creation Time State ------------------------------------------------------------ ex-s3 2012-11-14 13:54:40 +0800 running #virsh snapshot-dumpxml test ex-s3 <domainsnapshot> <name>ex-s3</name> <state>running</state> <parent> <name>ex-s2</name> </parent> <creationTime>1352872480</creationTime> <memory snapshot='external' file='/tmp/ex-s3'/> <disks> <disk name='vda' snapshot='external'> <driver type='qcow2'/> <source file='/var/lib/libvirt/images/test.ex-s3'/> </disk> </disks> <domain type='kvm'> ....
Also possible - for an offline domain, this now creates an external snapshot: virsh snapshot-create-as $dom --disk-only
(In reply to comment #4) > Also possible - for an offline domain, this now creates an external snapshot: > virsh snapshot-create-as $dom --disk-only Hi, Eric I try it with but failed qemu-kvm-rhev-0.12.1.2-2.331.el6.x86_64 libvirt-0.10.2-8.el6.x86_64 # virsh snapshot-create-as bug --disk-only error: unsupported configuration: disk snapshots of inactive domains not implemented yet
(In reply to comment #5) > # virsh snapshot-create-as bug --disk-only > error: unsupported configuration: disk snapshots of inactive domains not > implemented yet Ah, for that, we need a series of additional patches. I guess it's time to clone a new BZ.
see bug 876816 for offline disk-only snapshots
see bug 876817 for making virsh display whether a snapshot is internal or external, and filtering on that property
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0276.html