Sunday, April 25, 2010

Expanding a VirtualBox VDI file for Server 2008 x64 R2

I use virtual box as my SharePoint VM host because I want to be able to run 64bit Server 2008 R2 on my Windows 7 host machine.   When I first installed SharePoint 2010, the VDI (Virtual Disk for VirtualBox) I created was too small, so I had to expand it.   This is a bit of a challenge, but by doing some research I figured out how to do it.

The process involves creating a new, larger disk and copying the original boot and main partitions to the newer disk.   This can be done with gparted.  and the steps to do so are well documented here


However there are a few more steps you'll need to follow because you are using 64bit Server 2008 R2:
  • After you've followed the above instructions, mount the newer larger drive as the Primary Master and mount the Server 2008 R2 ISO.
  • Boot to the ISO (hitting any key when prompted)
  • Choose your language then on the next screen select repair
  • Select the partition and click ok
  • Choose the command line option
  • Switch to your c: drive
  • Type bootrec.exe /fixboot
  • Type bootrec.exe /rebuildbcd and after it runs successfully type A and hit enter to add the entry to the BCD store
  • Type exit and reboot the machine.
  • The machine should load, but kind of slowly, and then scandisk will run (allow it to run to completion), then windows should come back up.


No comments: