]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: improve virsh snapshot-create, add snapshot-edit
authorEric Blake <eblake@redhat.com>
Thu, 1 Sep 2011 20:21:28 +0000 (14:21 -0600)
committerEric Blake <eblake@redhat.com>
Sat, 3 Sep 2011 03:57:32 +0000 (21:57 -0600)
commit2b4d8deb6bbcdac0015607797bfebb1faf8a0245
treef8ff01abf8d8a7fc9d33a4dd3d16b470d54a6fc7
parent90ec08ed733974cd9dba93134e1cbe707e2abab4
snapshot: improve virsh snapshot-create, add snapshot-edit

Wire up the new snapshot creation flags in virsh.  For convenience,
teach 'snapshot-current' how to make an existing snapshot become
current (can be used after upgrading to newer libvirt to recover
from the fact that the older libvirt lost track of the current
snapshot after a restart).  The snapshot-create-as command is
intentionally not taught --redefine or --current, as this would
imply adding a lot of other options for everything else that can
appear in the <domainsnapshot> xml, but which is normally read-only.
Besides, redefining will usually be done on files created by
snapshot-dumpxml, rather than something built up by hand on the
command line.  And now that we can redefine, we can edit.

* tools/virsh.c (cmdSnapshotCreate): Add --redefine, --current,
and --no-metadata.
(cmdSnapshotCreateAs): Add --no-metadata.
(cmdSnapshotCurrent): Add snapshotname to alter current snapshot.
(cmdSnapshotEdit): New command.
* tools/virsh.pod (snapshot-create, snapshot-create-as)
(snapshot-current, snapshot-edit):  Document these.
tools/virsh.c
tools/virsh.pod