On Sat, May 30, 2015 at 02:35:51AM +0000, Boylan, Ross
wrote:> Does libvirt support snapshotting when the virtual disk comes from a
> vmdk file?
>From my quick test (refer below), seems like you can at-least use VMDK
as a backing file.
> http://wiki.libvirt.org/page/Snapshots#Desired_functionality seems to
> say no, since it says "'virsh snapshot', which requires all
disk
> images to be qcow2".
>
> OTOH, man virsh, http://libvirt.org/formatsnapshot.html, and
> http://libvirt.org/formatdomain.html#elementsDisks seem to indicate
> more flexibility, though I see nothing about vmdk.
>
> If there is support for vmdk, is it just for external snapshots, or do
> internal snapshots work?
>From my quick test (for offline disks with `qemu-img`), it does seem to
work:
$ qemu-img create -f vmdk base.vmdk 1G
$ qemu-img create -f qcow2 -o \
'backing_file=./base.vmdk,backing_fmt=vmdk' ./overlay1.qcow2
$ qemu-img info overlay1.qcow2
image: overlay1.qcow2
file format: qcow2
virtual size: 1.0G (1073741824 bytes)
disk size: 196K
cluster_size: 65536
backing file: ./base.vmdk
backing file format: vmdk
Format specific information:
compat: 1.1
lazy refcounts: false
And, as near as I know, internal snapshots are a feature of qcow2 format.
> Currently running libvirt 0.9.12, qemu-kvm 1.1.2 (though I could use
> vmware workstation), linux kernel 3.2.0.
--
/kashyap