Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to migrate a VM from KVM to Virtualbox (win7 64bit). I was able to convert the disk image using these commands:

VBoxManage convertfromraw -format VDI XX.img XX.vdi

qemu-img convert -f qcow2 XX.img -O vdi XX.vdi

I also tried to convert first to raw then to vdi. Still when i mount the new disk to virtual box either under IDE or SATA controller. The system does not boot at all. Gives (windows loading files..) then reboots.

Any advice is much appreciated, I might be missing a detail.

share|improve this question
up vote 10 down vote accepted

When you move the disk image, the installed OS is not aware of that, and it tries to boot with the drivers for the controllers of the previously used virtualization platform. Windows, when it cannot find the driver for the currently installed disk controller, BSOD's and reboots.

This is pretty much the same as moving a windows hard drive between different hardware platforms.

There can be two solutions - either use a v2v converter that can convert from KVM to VBox (I don't know of any, but if you do, please share), or inject the drivers into the VM's image before you start it in a new environment. The easiest way to do that would be to do the follwoing:

  • Before the conversion, in KVM, run mergeide.reg (you can find it on MS website and pretty much all over the internets)
  • Switch the boot disk under KVM to IDE, and start the VM up
  • If everything works, convert the image with qemu-img to a vbox format
  • Create a VM in VBox, with the first boot disk as IDE (not SATA or SCSI)
  • Attach the converted disk - the system should boot
  • Install the Vbox disk drivers (might have to attach a secondary
    small disk for them to take effect)
  • Switch the boot disk's interface to the desired controller type, and start the VM up again
share|improve this answer

You should be able to run sysprep on the Windows VM before making the conversion. This tells Windows to check the drivers before loading because they will change.

share|improve this answer
Run sysprep with what options? – ndemou Jul 5 at 7:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.