]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: wire up live qemu disk snapshots
authorEric Blake <eblake@redhat.com>
Sat, 20 Aug 2011 04:33:13 +0000 (22:33 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 5 Sep 2011 13:03:05 +0000 (07:03 -0600)
commit9c21b44131c4b28c134314b39befad21dd7b99d7
tree635dc8c4a32bc81dd9c571564d2fe6d9f9649483
parente702b5bab16c9d0225b25cccd4c3ae0cee101c62
snapshot: wire up live qemu disk snapshots

Lots of earlier patches led up to this point - the qemu snapshot_blkdev
monitor command can now be controlled by libvirt!  Well, insofar as
SELinux doesn't prevent qemu from open(O_CREAT) on the files.  There's
still some followup work before things work with SELinux enforcing,
but this patch is big enough to post now.

There's still room for other improvements, too (for example, taking a
disk snapshot of an inactive domain, by using qemu-img for both internal
and external snapshots; wiring up delete and revert control, including
additional flags from my RFC; supporting active QED disk snapshots;
supporting per-storage-volume snapshots such as LVM or btrfs snapshots;
etc.).  But this patch is the one that proves the new XML works!

* src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML): Wire in
active disk snapshots.
(qemuDomainSnapshotDiskPrepare)
(qemuDomainSnapshotCreateDiskActive)
(qemuDomainSnapshotCreateSingleDiskActive): New functions.
src/qemu/qemu_driver.c