Tuesday, August 16, 2022

Convert VirtualBox .vdi image to .raw then to KVM .qcow2

I installed Windows 10 into VirtualBox to replace my old 32 bit Windows 7 which can no longer accommodate modern Visual Studio. However the Visual Studio Installer just hard locks my VirtualBox image. So I installed KVM and converted the image and it works fine.

I got the instructions for converting the image from https://www.tecmint.com/migrate-virtualbox-vms-into-kvm-vms/

Very simple straightforward instructions for converting from VirtualBox .vdi to KVM .qcow2 image.

You have to first convert the .vdi to a raw image, then convert the raw image to a .qcow image

$ vboxmanage clonehd --format RAW /home/james/VirtualBox\ VMs/debian/debian.vdi debian_10_Server.img
$ qemu-img convert -f raw debian_10_Server.img -O qcow2 debian_10_Server.qcow2