]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: allow deletion of just snapshot metadata
authorEric Blake <eblake@redhat.com>
Fri, 12 Aug 2011 03:12:05 +0000 (21:12 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 2 Sep 2011 22:51:33 +0000 (16:51 -0600)
commit795fe9b2fa007410ef96e778864ec1209bf170e3
tree8935e73897e4631bc0a6ea1984fb1b19f2b8328e
parent67555b24342d7b5925d460282b84cc3d752f1380
snapshot: allow deletion of just snapshot metadata

A future patch will make it impossible to remove a domain if it
would leave behind any libvirt-tracked metadata about snapshots,
since stale metadata interferes with a new domain by the same name.
But requiring snaphot contents to be deleted before removing a
domain is harsh; with qemu, qemu-img can still make use of the
contents after the libvirt domain is gone.  Therefore, we need
an option to get rid of libvirt tracking information, but not
the actual contents.  For hypervisors that do not track any
metadata in libvirt, the implementation is trivial; all remaining
hypervisors (really, just qemu) will be dealt with separately.

* include/libvirt/libvirt.h.in
(VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY): New flag.
* src/libvirt.c (virDomainSnapshotDelete): Document it.
* src/esx/esx_driver.c (esxDomainSnapshotDelete): Trivially
supported when there is no libvirt metadata.
* src/vbox/vbox_tmpl.c (vboxDomainSnapshotDelete): Likewise.
include/libvirt/libvirt.h.in
src/esx/esx_driver.c
src/libvirt.c
src/vbox/vbox_tmpl.c