Convert VirtualBox .vdi image to qcow2
Posted On November 14, 2017
We needed to convert .vdi image created on VirtialBox hiperviser to qcow2 format for use with KVM. Below are steps that we took to get it done.
1. Convert vdi to raw disk image
VBoxManage clonehd --format RAW vmimage.vdi vmimage.img
2. On KVM host we can now convert it to qcow2
qemu-img convert -f raw vmimage.img -O qcow2 vmimage.qcow2