Convert from VirtualBox to KVM
Quickest and dirtiest way to convert your VirtualBox machine into a KVM machine.
First of all, make sure you have enough space. If you have created a dynamically growth disk, the virtual disk has been defined as 20GB in size, but is only currently using 8GB, you will need 28GB extra (8 for the original file you already have + 20 for the temp file + 8 for the final file). If you’re using disks with pre-allocated size, you will need 2 times extra the space (20 original + 20 temp + 20 final, in this example).
1 – Convert the VirtualBox VDI file into a RAW image.
$ VBoxManage clonehd --format RAW MyTestVM.vdi MyTestVM.raw
2 – Convert the RAW image into a QCOW file.
$ qemu-img convert -f raw MyTestVM.raw -O qcow2 MyTestVM.img
3 – Voila. Go into virt-manager, create the machine, and use your newly created image.