]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: add qemu snapshot redefine support
authorEric Blake <eblake@redhat.com>
Thu, 1 Sep 2011 22:50:17 +0000 (16:50 -0600)
committerEric Blake <eblake@redhat.com>
Sat, 3 Sep 2011 03:57:33 +0000 (21:57 -0600)
commitbd18b9670fd875db8734da4e62edcd027f612c00
tree1f2d0e2ad4a1fb2dc0f29e0dce0047b902186d6a
parentece197e9d49bccbd90757ce89de3480432bea1c6
snapshot: add qemu snapshot redefine support

Redefining a qemu snapshot requires a bit of a tweak to the common
snapshot parsing code, but the end result is quite nice.

Be careful that redefinitions do not introduce circular parent
chains.  Also, we don't want to allow conversion between online
and offline existing snapshots.  We could probably do some more
validation for snapshots that don't already exist to make sure
they are even feasible, by parsing qemu-img output, but that
can come later.

* src/conf/domain_conf.h (virDomainSnapshotParseFlags): New
internal flags.
* src/conf/domain_conf.c (virDomainSnapshotDefParseString): Alter
signature to take internal flags.
* src/esx/esx_driver.c (esxDomainSnapshotCreateXML): Update caller.
* src/vbox/vbox_tmpl.c (vboxDomainSnapshotCreateXML): Likewise.
* src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML): Support
new public flags.
src/conf/domain_conf.c
src/conf/domain_conf.h
src/esx/esx_driver.c
src/qemu/qemu_driver.c
src/vbox/vbox_tmpl.c