Converting KVM to VirtualBox

I have had most of my test environment, aka puppetmasters, test mysql setups etc running in KVM for the past couple of years .. (yes I`m still using a lot of Xen in production environments, but we've also been using KVM for a while already .. it's a good mix) , Virtual box has always been the lesser loved Virtualization platform , however while playing more and more with Vagrant Up I realized I needed to convirt some boxen (e.g my PuppetMaster) to Virtualbox, and google was really no good help(most people seem to go the other way , or want to use some proprietary tools )

So I remembered VBoxManage and apparently I hade blogged about it myselve already ..
I just hate it when I search for stuff and google points right back to me

So I converted my puppetmaster's disks

  1. VBoxManage convertdd Emtpy-clone.img PuppetMasterroot.vdi
  2. VBoxManage convertdd puppet-var.img PuppetMastervar.vdi

Now when booting the VM in Virtualbox , obviously the kernel panicked .. as my KVM disks are recognised as as /dev/hda and and Virtualbox defaults to /dev/sda and LVM doesn't really like disks to be on another names
No commandline fu here to help me, but using the VirtualBox gui to move the disks to the IDE controller rather than the SATA controller.

Now all I need to do is wait for some smart guy who comments that you probably could use VBoxManage storagectl to achieve the same goal :)

And wait till Vagrant Up start supporting KVM , so I can move back :)

Comments

Tracy Mills's picture

#1 Tracy Mills : KVM sounds interesting and

KVM sounds interesting and certainly seems like the future in virtualization on nix. The one feature virtualbox offers me that I could not live without is the headless mode with interaction with the VM over the remote desktop protocol.

Tracy Mills from iPad Application Development


Pavel's picture

#2 Pavel : Vagrant Up

Thanks, I didn't know something like Vagrant Up existed. Are there any drawbacks to it apart from kvm not being supported?


Brian's picture

#3 Brian : qemu-img approach

KVM/QEMU can probably handle this as well.

qemu-img convert -O vdi kvm_image vbox_image


Fatal error: Call to undefined function drupal_get_path() in /var/vhosts/www.krisbuytaert.be/htdocs/blog/includes/module.inc on line 285