libvirt/tools
Eric Blake 4e9953a426 snapshot: allow reuse of existing files in disk snapshot
When disk snapshots were first implemented, libvirt blindly refused
to allow an external snapshot destination that already exists, since
qemu will blindly overwrite the contents of that file during the
snapshot_blkdev monitor command, and we don't like a default of
data loss by default.  But VDSM has a scenario where NFS permissions
are intentionally set so that the destination file can only be
created by the management machine, and not the machine where the
guest is running, so that libvirt will necessarily see the destination
file already existing; adding a flag will allow VDSM to force the file
reuse without libvirt complaining of possible data loss.

https://bugzilla.redhat.com/show_bug.cgi?id=767104

* include/libvirt/libvirt.h.in (virDomainSnapshotCreateFlags): Add
VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT.
* src/libvirt.c (virDomainSnapshotCreateXML): Document it.  Add
note about partial failure.
* tools/virsh.c (cmdSnapshotCreate, cmdSnapshotCreateAs): Add new
flag.
* tools/virsh.pod (snapshot-create, snapshot-create-as): Document
it.
* src/qemu/qemu_driver.c (qemuDomainSnapshotDiskPrepare)
(qemuDomainSnapshotCreateXML): Implement the new flag.
2012-01-10 11:53:23 -07:00
..
.gitignore Support automatic creation of leases for disks in sanlock 2011-06-28 18:18:06 +01:00
console.c console: plug memory leaks 2011-12-20 13:36:45 -07:00
console.h virsh: Allow other escape characters for console 2011-12-01 09:51:25 +01:00
libvirt_win_icon_16x16.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_32x32.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_48x48.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_64x64.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt-guests.init.sh save: support bypass-cache flag in libvirt-guests init script 2011-07-21 16:24:09 -06:00
libvirt-guests.service.in Add support for systemd init service 2011-11-18 16:16:02 +00:00
libvirt-guests.sysconf save: support bypass-cache flag in libvirt-guests init script 2011-07-21 16:24:09 -06:00
Makefile.am build: follow directory install conventions 2011-12-12 10:26:57 -07:00
virsh_win_icon.rc Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
virsh.c snapshot: allow reuse of existing files in disk snapshot 2012-01-10 11:53:23 -07:00
virsh.pod snapshot: allow reuse of existing files in disk snapshot 2012-01-10 11:53:23 -07:00
virt-pki-validate.in virt-*-validate.in: quote all variable references 2011-02-21 10:32:34 -07:00
virt-sanlock-cleanup.in Fix virt-sanlock-cleanup documentation 2011-10-17 10:57:36 -06:00
virt-xml-validate.in virt-*-validate.in: quote all variable references 2011-02-21 10:32:34 -07:00