
You can now transfer the QCOW2 disk image to KVM host.Īfter that, you can create a new virtual machine by importing from the existing disk image. In the above case, you need to convert VMDK image to QCOW2 format: qemu-img convert -f vmdk -O qcow2 ubuntu22.vmdk ubuntu22.qcow2 Create New KVM Virtual Machine.See example files below ls -1 ubuntu22.vmdk You will either have VDI or VMDK depending on how the vm was created.

What if you have an OVA image exported from VirtualBox? In this case, then you also need to convert the OVA to QCOW2 image. You can simply do the direct conversions of VDI to QCOW2 by executing the command below qemu-img convert -f vdi -O qcow2 vm-disk-name.vdi vm-disk-name.qcow2 Convert OVA to QCOW2 The conversion can be done by executing the command below qemu-img convert -f raw vm-disk-name.img -O qcow2 vm-disk-name.qcow2 Convert VDI Directly to QCOW2 Now, copy the raw disk image to the host running KVM and convert it to the format supported by KVM, in this case, qcow2. ls ~/kvm-images vm-disk-name.img Convert RAW Disk Image to KVM QCOW2 You should now be having a RAW virtual machine disk image, located in the ~/kvm-images for our case. Replace the location of the VirtualBox VM and the name of the VM disk ( /path/to/vm-disk-name.vdi) accordingly. Next, convert a specific VirtualBox VM disk to raw image.

One method is to convert VDI to raw disk image (.img) and then convert the raw disk image to QCOW2.There are two ways in which we can convert the VirtualBox disk image into KVM qcow2. We also assume that you are not running VirtualBox and KVM on the same host at the same time.
