Windows 7 Boot From VHD –> SharePoint 2010

With the recent release of SharePoint 2010 Beta (Beta 2 if you call the initial CTP as the initial Beta), there’s a bunch of folk installing like crazy, keen to have a first look & play with the new product / features.

Being a 64-bit only release, there’s a ‘change in the wind’ as far as how you’d create a SharePoint VM.   Virtual PC has been my friend for soooo long, but no more.  (“It’s not me, it’s you”)

Running Windows 7 on my laptop means that I could either use Virtual Box (Sun) – or VMWare – or have a Boot to VHD configuration.

Having never done this before, it was a little trickier than I thought it would have been. 

Much of this was discovered after reading a great article from Scott Hanselman about the full spectrum of all matter pertaining to Boot from VHD

I’m only re-telling the tale, with a SharePoint flavour (ie. how *I* did it – thanks Scott !)

And – some dudes on Twitter helped too.  Thx @alexanderb + @kiwibommy.

The premise is that you create (or re-use) a Virtual Machine Hard Drive (VHD) – and configure the drive (mount it) to be able to dual-boot from it.  Cool, eh ?

The catch is that it must be Windows 7 RTM or Windows Server 2008 R2.  (had initially tried the following with zero success – and released I had Windows Server 2008 RTM by mistake)

Anyway, I need a new Windows Server x64 installation for SharePoint, let’s get going.

Create a VHD

Work out where you want to put the VHD file – you might need 20-30GB of room

  • Open a DOS Command Window
  • Type the command :  DISKPART
  • Create a vdisk using the following command

create vdisk file=”<drive><directory><filename>.vhd” type=<fixed|expandable> maximum=<size>

As an example, I created a 30GB file (VHD) with “FIXED” size using the following :

create vdisk file=”c:vmsp2010sp2010.vhd” type=fixed maximum=30000

This takes about 5-10 minutes – to allocate the disk space, and get the VHD sized up. 

You can also go for “expandable” – which will just take a second, and expand as it goes.  But, performance is not as good – better to go for “fixed”.

Take note of the file name, drive and folder you used – write it down.

Boot from Windows Server DVD

Now you need to grab your Windows Server 2008 DVD – this needs to be the “R2” version, doesn’t work from Windows Server 2008 RTM – you need R2. 

That’s not advice – it’s a requirement.  :-)  

Shut down your PC, and re-start, and choose to boot from the DVD.  

  • When you boot from the DVD, you’ll see the ‘loading files’ screen for a few minutes.

Image772

  • Next, the “Install Windows” page appears

Image774

  • Click Next
  • Click Repair My Computer

Image775

  • When you see this next screen (below), press SHIFT-F10

Image777

DISKPART (part II)

You’ll now be seeing a DOS command prompt, for some reason with the home directory of X:sources

  • Type DISKPART
  • Type the following to assign your VHD

select vdisk file="d:vmsp2010sp2010.vhd"     

attach vdisk

  • IMPORTANT : The directory where you have your VHD file is actually been upp’ed a drive letter – with C: now becoming D:  (confused me for a bit…!)
  • You can view the drives available using the command LIST DISK (within DISKPART)

OK – now that the VHD has been mounted, it’s officially a drive – and you can install Windows Server, as if it was another hard disk.

  • Type EXIT to drop out of DISKPART
  • And then EXIT again, to close the command prompt

Install Windows Server 2008

The tricky stuff is now out of the way.

You’re then back at the pretty graphical “Install Windows” page

So, what are you waiting for – click Install !

  • Click through until you get to the ‘choose the drive’ page

Image778 

  • Create a partition on the new drive (the magical VHD)
  • Format the drive and click Next
  • … and go ahead and install Windows Server 2008 R2 like normal.

It will ask to re-boot, and after re-starting, you’ll see the ‘boot manager’ screen

Make sure to choose Windows Server 2008

That’s all there is to it !

🙂

Next up – need to do a few things on this new “VM”…

  • Configure Wireless
    • Not on by default in Windows Server 2008
    • Need to ‘add feature’ for the Wireless LAN
    • And then actually start the service.
  • Install Microsoft Office 2010
  • Install SQL Server 2008
  • Install Visual Studio 2010
  • and then – install SharePoint 2010 !   

……more adventures to follow, as I get into the install of SharePoint 2010.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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