Skip to main content

Converting Virtualization Image Formats with qemu-img convert

qemu-img is a practical tool to convert between multiple virtual disk image formats. As of qemu-img-0.12.1.2-2.479.el6.x86_64 supported formats are in the following list.

raw: Raw disk image format
qcow2: QEMU image format (copy-on-write)
qcow: Old QEMU image format
cow: User Mode Linux copy-on-write image format
vdi: VirtualBox 1.1 compatible image format
vmdk: VMware 3 and 4 compatible image format
vpc: VirtualPC compatible image format (VHD)
vhdx: Hyper-V compatible image format (VHDX)
cloop: Linux Compressed Loop image

A few examples:

kvm raw image to qcow2
$ qemu-img convert -f raw -O qcow2 raw-image.img qcow2-image.qcow2

kvm raw image to vmdk
$ qemu-img convert -f raw -O vmdk raw-image.img vmware-image.vmdk

vmdk to raw image
$ qemu-img convert -f vmdk -O raw vmware-image.vmdk raw-image.img

vmdk to qcow2
$ qemu-img convert -f vmdk -O qcow2 vmware-image.vmdk qcow2-image.qcow2

vdi to qcow2
$qemu-img convert -f vdi -O qcow2 vbox-image.vdi qcow2-image.qcow2

Comments

Popular posts from this blog