VirtualBox -> KVM

I made the switch today to move from VirtualBox to KVM on my Fedora 13 workstation. At first I thought I would have to reinstall all of my guests, then I found this blog on how to convert VirtualBox guests to work in KVM: Convert Virtualbox vid to KVM qcow.

I left them as raw images (not sure if that’s good or bad, but it works) 🙂

First, convert your VirtualBox vdi files to raw format:

VBoxManage clonehd --format RAW fedora13.vdi fedora13.img

Notice I did NOT pass in the path to the vdi file. VBoxManage will magically know where to find it.

Then I moved the .img file to /var/lib/libvirt/images:

sudo mv .VirtualBox/HardDisks/fedora13.img /var/lib/libvirt/images/

Once I had the images copied, I started virt-manager to create my guests. Click the New button and follow along in the wizard.

First give your VM a name, and select Import existing disk image, press Forward.

Next, set the OS type and Version (not sure if this is required). Enter the path to the image or use the Browse button.

Find the image in the list, select it, press Choose Volume.

Now you have a storage configured, click Forward to finish creating your guest.

Set the desired Memory (RAM) and CPUs, followed by clicking Forward button.

Click Finish to add it to the list of guests.

Select the guest from the list, press Run button, and watch it start.

There you go a running KVM guest that started life as a VirtualBox guest.


8 thoughts on “VirtualBox -> KVM

  1. Can I ask why you moved?
    Also, if you used the same host, can you tell us about relative performance kvm vs virtualbox?


  2. Yeah I would be interested in how VirtualBox stacks up against KVM on Fedora. I am thinking about doing the same, but VirtualBox seems like it has many features and a much more polished GUI, settings, etc. etc.

  3. Does this work with that “other” operating system too? I had serious problems installing XP under KVM, so I have to use BOTH on my system and I would like to dump Virtual Box if I can.

  4. Everything worked for me as you’ve laid out here, however the deal-breaker came when I realized there was no immediate option to use bridged networking. I use Windows XP as a VM under VirtualBox so that I can use software like VMware vSphere Client and MS Outlook. I can’t connect to my domain if I can’t use the same subnet as eth0…

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s