Thin provisioning improvements in KVM

Summary

libvirt and QEMU will feature increased support for thin provisioning. Thin-provisioned virtual machines will be able to switch to "thick-provisioned" for better performance incrementally and in the background, while the virtual machine is running.

Owner

Current status

Detailed Description

QEMU will include two different mechanisms to complete thin-provisioned virtual machine images. "Copy-on-read" will store data in the local image as the virtual machine needs it, so that future references to the same data will not need to go to the (typically slower) shared image. On top of this, "streaming" will read data from the shared image to the local image slowly and in the background.

Benefit to Fedora

New virtual machines can be started quickly based on existing (possibly remote) images, and still ultimately reach the same speed as if the VM had been provisioned completely.

Scope

libvirt 0.9.10 and QEMU 1.1 should include support for copy-on-read and streaming.

How To Test

Install a virtual machine using vm1 virt-install or virt-manager.

Create a thin-provisioned image file using qemu-img (...).

Create another virtual machine vm2 using virt-manager, pointing it to the newly-created image file.

Start the second virtual machine vm2.

Start streaming using virsh (...).

Watch the image file for vm2 grow.

Watch the status of streaming using virsh (...).

Restart vm2 and repeat steps 5-7.

Wait for vm2's image to be fully streamed in.

Shut down vm2, and destroy the image that you used for vm1.

Restart vm2, which should still work.

User Experience

virsh will support additional commands to start a streaming operation and to query its status. Copy-on-read can be enabled implicitly by streaming or explicitly using the libvirt XML format for disks.

Dependencies

None outside libvirt and QEMU.

Contingency Plan

None necessary, libvirt and QEMU changes are independent even though both are needed to make the feature available.

Documentation

(Will link to material on libvirt.org when it is ready).

Release Notes

This release of Fedora adds support for image streaming in libvirt. Streaming lets an administrator start new virtual machines quickly based on existing images; virtual machines are then provisioned completely in the background as they run.