How to convert a VM from VirtualBox to KVM

Converting the virtual machine images is very easy, but many guides suggest you to convertĀ  from VDI to RAW and then from RAW to QCOW2. It doesn’t really make sense, you’ll waste double the time, and it’s gonna be hours if the drive is big.

To convert from VDI to QCOW2 just use qemu-img:

qemu-img convert -f vdi -O qcow2 [VBOX-IMAGE.vdi] [KVM-IMAGE.qcow2]

If the virtual machine was Windows-based, probably will crash at first boot, because of the virtual hardware changes, and because there are no virtio drivers installed (unless you make a VM with IDE emulation)

For fix the BSOD at boot you can do onf of this:

Personally I chose the first option, but then I had to install again hundreds and hundreds of security updates, it would have been better if I installed the patch before migrating.

Update: I noticed that the converted Windows XP VM uses the cpu at 100% even when idle. This is a nasty bug that would take ages to fix. I tried to force enabling ACPI, but all I can get is a BSOD on boot. I’ll just scratch the VM and rebuild it…

Like our content? Sign up to our newsletter to keep in touch.
We'll never send spam, your data will be treated according to our privacy policy

2 thoughts on “How to convert a VM from VirtualBox to KVM

  1. Thanks for another magnificent post. Where else could anyone get that kind of information in such a perfect manner
    of writing? I’ve a presentation next week, and
    I’m at the look for such information.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.