[libvirt] QEMU snapshots on ZFS

I have a libvirt to control qemu domains with various flavours of Windows on Ubuntu 14.04 Trusty. The disk images are ZFS volumes. After I have resolved scheduling problems related to kernel (latest 3.15.3-031503-lowlatency kernel seems to have resolved scheduling and BSOD issues), I have never seen Windows to run this fast, even on bare iron. This is a WONDERFUL combination. Now I am starting to move forward, and have discovered that snapshot is only supported as QEMU native "savevm" command, which only works on QCOW2 backing image. Is there any chance to include support for ZFS native snapshots? I.e. do a coordinated RAM snapshot in a separate file, snapshot ZFS volume and tie these two together in a snapshot XML file. A related, but different question: any chance to support ZFS-backed storage pools, so that ZFS volumes could be created, and not QCOW images in ZFS file system (this is a waste of ZFS, as ZFS already has native COW, snapshots, cloning, migration and much more). Should I start a separate thread for this topic?

On 07/04/2014 10:52 AM, Arunas Ruksnaitis wrote:
Now I am starting to move forward, and have discovered that snapshot is only supported as QEMU native "savevm" command, which only works on QCOW2 backing image.
That's not the only supported snapshot; we also support creating external snapshots (qemu 'blockdev-snapshot-sync'). And as of qemu 2.1 and libvirt 1.2.7 (both due out at the end of this month), it should be possible to take an external snapshot to go from 'file (r/w)' to 'file (r/o) <- temporary (r/w)' , then use your ZFS native commands to do whatever you want with the read-only 'file', then do an active commit to go back to 'file (r/w)'.
Is there any chance to include support for ZFS native snapshots? I.e. do a coordinated RAM snapshot in a separate file, snapshot ZFS volume and tie these two together in a snapshot XML file.
Sure, patches are welcome. People have also asked for native LFS volume snapshot integration; the concept is the same - someone would need to submit the patch that coordinates the third-party snapshots to happen at a point while qemu is temporarily using a qcow2 wrapper around the file, then active commit the temporary wrapper back into the main file once the third-party snapshot is done.
A related, but different question: any chance to support ZFS-backed storage pools, so that ZFS volumes could be created, and not QCOW images in ZFS file system (this is a waste of ZFS, as ZFS already has native COW, snapshots, cloning, migration and much more). Should I start a separate thread for this topic?
Patches are welcome; you can use existing storage pool code as a starting point on what needs to happen. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Arunas Ruksnaitis
-
Eric Blake