adrahon/vagrant-kvm — pull request #63 by miurahr (2013-11-03 03:07:27+00:00)
Title: support copy-on-write backing image

Here is an idea not to copy box image but make new image backed by box image file.
This means that

- Use box image as read-only base image.
- Use storage-pool image for VM but is cascaded with base image.
- When destroy, only cascaded image can be removed.
- We can share base image if user need multiple-VM.
- Speed-up to create VM.

This pull request treat OVF VMDK specially.

It need many time to convert QCOW2 format in first time.
After that, request will be processed rapidly.

- convert ovf vmdk to qcow2 image to support this
- remove vmdk when conert succeeded.
- backing image will be created with qemu-img create -b

- TODO: check backing image when removing box definition.

For backward compatibility, we still support 'raw' image.
Because qemu is not support backing support of raw image,
vagrant-kvm act same behavior, copying image, as previous version when user
use
kvm.image_type = 'raw'
in Vagrantfile.

Signed-off-by: Hiroshi Miura