Linux – Migrate guest from KVM to VirtualBox

kvm-virtualizationlinuxlvmvirtualbox

I'm migrating some machines from KVM to VirtualBox for a transitional period while we build our new virtualization environment.

The problem now, the disks are located on a LVM partition, and I have to convert them to a format VirtualBox recognizes. I've found a lot of documentation for the transition on the other direction, but not on this one.

qemu-img convert -c /dev/Volume01/Disk -O qcow2 Disk.qcow2

The tool seems to do its job, but the disk won't work. On VirtualBox, I get FATAL: No bootable medium found! System halted.. Are there another options?

Best Answer

dd the volume first:

dd if=/dev/Volume01/Disk of=/tmp/image.raw
qemu-img convert -O vdi /tmp/image.raw test.vdi
rm /tmp/image.raw

Technically you could give that raw file to VirtualBox, but VDI is its native format.