]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: add snapshot-create-as memspec support
authorEric Blake <eblake@redhat.com>
Wed, 7 Nov 2012 03:55:53 +0000 (20:55 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 7 Nov 2012 16:04:18 +0000 (09:04 -0700)
commit2cd4d8e506ae80742c29af07eed423cca163d58d
tree956efa908a159767ff1b37f555ccd79d8dd0d4f2
parent9d91a18ebf1594e76ff26d79e799763efc6b1cac
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.
tests/virsh-optparse
tools/virsh-snapshot.c
tools/virsh.pod