1

I have a computer with the following dual boot setup:

Hard drive 1:
  \_ Linux
  \_ Bootloader (grub)

Hard drive 2
  \_ Windows

What I want to do is turn the Windows installation into a Virtual Box VM that I can use in another computer.

Some sources, like this one, suggest turning Windows into a VHD image using a tool called Disk2VHD. This works, but when I try to load this image into VirtualBox, it doesn't boot because no boot loader is present. It seems to me that this happens because Windows was originally in a dual boot machine.

Is there a more reliable way of making this conversion from Windows to VHD?

1 Answer 1

1

I have resolved this problem on my own. These were the steps.

  1. In my case, I had Windows 7 installed in EFI mode. VirtualBox does not support Windows 7 in EFI mode, so I moved to VMware.

  2. Export the live Windows operating system using VMware's vCenter Converter tool.

  3. In the VMware host, create a new virtual machine selecting "I will install the operating system later on".

  4. Launch the newly created virtual machine, then power it off and close VMware.

  5. Open the virtual machine's .vmx file, and add the following line to it: firmware="efi"

  6. Open VMware again, then open the virtual machine's settings.

  7. Create a new hard disk and import the image previously exported using vConverter.

  8. Delete the default empty hard disk, leaving only the one you just created.

  9. Select the CD/DVD drive, and attach the rEFInd boot manager ISO to it: http://www.rodsbooks.com/refind/

  10. Close the settings menu, and launch the virtual machine.

  11. If the rEFInd screen appears, just press enter, and windows will boot. If a grub error screen appears instead, press ctrl+alt+del to reboot the VM, then spam F10 while it boots until you see a boot menu. Select CDROM from this boot menu. Then the rEFInd menu will appear.

Observation: in the VMware options, make sure that you have selected your correct Windows version (32-bit or 64-bit).

After these steps, Windows will boot. Then you can keep booting it the next times by just repeating step 11.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .