Installing SharePoint 2010 using Windows 7 Boot from VHD

If you plan to install SharePoint in a VHD using the Windows 7 Boot from VHD capability, there a few gaps in the story that are worth sharing…

First off, I wanted to make my life as simple as possible and start with a base Windows 2008 build, rather than create my own from scratch.  Here’s how to speed along that process.

First, download the Windows 2008 R2 Enterprise Trial VHD from the Microsoft Download site

Expand the downloaded files, then open the Command Prompt. Be sure to Run as Administrator though!

Now execute these commands:

bcdedit /copy {current} /d “Boot_From_VHD”

Copy the CSLID that is displayed, and then use that CLSID as you run each of the following commands:

bcdedit /set {CLSID} device vhd=[C:]\vhdname.vhd

bcdedit /set {CLSID} osdevice vhd=[C:]\vhdname.vhd

bcdedit /set {CLSID} detecthal on

You should replace [C:]\vhdname.vhd with the path and name of your extracted VHD.

Once that is complete reboot and you will have the option to “Boot_From_VHD”!  You can verify the bootloader is configured correctly with the bcdedit command which will list all the boot options.  If you want to delete the entry make note of the GUID listed in bcdedit and use the following command…

bcdedit /delete {GUID} /cleanup

At this point you may find (as I did) that when you boot your VHD it bluescreens. This can often be because the maximum size of the VHD was configured to be larger than the free space available on the physical hard drive.

In Windows 7 you can mount the VHD as a volume in Computer Management, and shrink the volume (thanks

To do this, open Computer Management from Administrative Tools. Click Disk Management in the nav pane. Then, on the Action menu click Attach VHD. Right-click the volume you want to shrink and click Shrink Volume.

But that just decreases the size of the volume as seen by the guest OS. It doesn’t decrease the amount of physical disk space the VHD attempts to reserve when you boot it.  That’s the next step…

Download and install VHD Resizer from and shrink the VHD to a suitable maximum size for your physical disk. I chose 25Gb.

Now reboot your PC into your Windows 2008 virtual machine and simply install SharePoint 2010.  I recommend using Joe Li’s SharePoint 2010 installation FAQ as a guide.

Happy SharePointing!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s