2

I have a dev laptop with Windows 7 installed. I want to switch this to Ubuntu and convert the existing Win7 physical installation to use in VirtualBox running under the newly installed Ubuntu.

I don't need to boot into Native Windows after this is complete - it can be VM-only after this is done.

I tried following this article on virtualbox.org, but it did not to work with Win7. I was not sure how to proceed given that I have the partition w/ Win7 installed on it as well as the System Reserved 100mb partition, so I selected both partitions from within disk2vhd, and unselected vss and vhdx options, but no luck (it wouldn't start at all, not even BSOD, I got some NS_ error that I don't have a record of now).

I also found this article which discusses using VBoxManage's createrawvmdk option to create a pseudo-VMDK file pointing to the physical disk, but I'm not sure which steps I need to perform, mainly because this answer gives another easier strategy of using the existing MBR in the new VMDK file.

So I now have confusion, should I creating a loopback device pointing to the fake master boot record, as mentioned in the fds-team.de link? Or just create the VMDK directly and re-use the GRUB boot loader from within my VM? I'm a bit concerned about the 2nd option given the severe data corruption that would occur should I ever accidentally boot the VM and select Ubuntu while already running the same Ubuntu install natively

The articles I linked to are kind of old, so maybe there is an even better way to do this now? If there's an updated process of the 1st link from virtualbox.org that uses disk2vhd (or equivalent VMWare utilities) that would probably be my 1st choice.

Thanks!!!

2 Answers 2

2

I found the solution for this. I post the answer in hopes other may find this and be helped

The first link I posted above (from virtualbox.org) basically is correct. I will use that as the basis here and give updated answer for win7 / virtualbox.

  1. Prepare the Windows registry using MergeIDE utility mentioned in the link. Don't bother with the .bat or .exe files just import the .reg file directly (utilities are not design for win7, but reg keys are same).
  2. Run disk2vhd utility
  3. Deselect vxhd and use Volume Shadow copy if they are selected (for me only vxhd was selected by default)
  4. Make sure you select boot partition and system reserved partition (both are needed, if you only select c:\ drive it will fail)
  5. Select a different partition other than c:\ to save the VHD on to supposedly save time (on and off both appeared to take same amt time for me, ymmv)

Now you have your VHD file. So, you may be thinking, 'Cool, virtualbox now supports VHD, I'll just fire this up'. I recommened convert to a VDI file anyway, twice my system crashed and the entire 80GB VHD was irreparably corrupted. No idea whether that could just as easily happen with VDI format, but why mess around.

Only other thing you may have to do, is change the controller that vhd lives on. Mine defauled to IDE, the image wouldn't boot until I changed to SATA

Other notes:

-- When I booted the VHD, it had to run chkdsk and correct some files -- When I booted into Win7 the first time after running the VHD in virtualbox, for some reason the chkdisk also needed to run and clean some files

I mention these last 2 points since that gave me the impression I may have done something wrong. If others see this that have the knowledge, hopefully they can add comments or edit the post.

0

You could probably use Microsoft Virtual Machine Converter 3.0 to make a VHD of your current Windows 7 installation and then use or convert that VHD for virtualbox.

HTH.

1
  • Thanks. No luck, it appears this tool would have the functionality, but it requires a Hyper-V host to send the created VHD to. Commented Nov 13, 2014 at 23:15

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.