Sunday, November 28, 2010

My SharePoint Development Environment

I have seen many blog posts on using a variety of configurations to run SharePoint 2010, MOSS, WSS, etc. Most of the solutions that I have seen, they revolved around having a hosted machine to run the development environment.

Face it, developing SharePoint solutions is not an easy task. There are so many different factors that can affect your results. The best way IMHO, to create SharePoint solutions is to have a SERVER OS Environment. Since Microsoft VM does not support creating 64bit images, you are left with either Sun’s VirtualBox or VMWare. Regardless of which of these 2 you choose, you still have to deal with the fact that you will run a hosted environment inside your machine.

One of the cool tip I got from AC (#BuckeyeSPUG meeting), was to use Windows Virtual Host. Since I am running Windows 7 x64 Ultimate, I decide to give it a try. This is my laptop configuration:

Hardware: Dell Vostro 1520, 6GB RAM, 320GB HD. OS: Win7 x64 Ultimate edition.

Step 1: Make sure your laptop supports Hardware Virtualization. You will need to enable this setting on your BIOS. If you have the Dell Vostro 1510 you are out of luck (asked me how I know… ;). A: It supports virtualization, but it is disable on the bios.. WTF..!

Step 2: You need to get a bootable image. For more information, check this article on Technet about VHD Support in Win7.

You will need to use the Windows Image to Virtual converter tool Wim2VHD. Get it from http://Code.msdn.microsoft.com/wim2vhd

Get your Win2008_R2 iso and mount it. Run the following command to extract a bootable image. In my case, the iso image is mounted on the F: drive. Also, I put all of the output inside a root folder named vhd.

  • cscript wim2vhd.wsf
    • /WIM:f:\sources\install.wim
    • /SKU:SERVERSTANDARD
    • /SIZE:51200
    • /VHD:c:\vhd\SP2010\win2k8_r2SP2010.vhd

Step 3: Now you need to get familiar with BCDEdit (Boot Configuration Data Store Editor). .

Once you have your bootable image, then you can create multiple boot configurations:

bcdedit /copy {current} /d "Win2008R2 SP2010 Base Dev"

This will return a GUID. Copy that GUID, you will need it for another step.

image

bcdedit /set {returnedGUID-in-here} device vhd="[c:]\vhd\Base2010\win2k8_r2SP2010.vhd"
bcdedit /set {returnedGUID-in-here} osdevice vhd="[c:]\vhd\Base2010\win2k8_r2SP2010.vhd"

Now when you reboot, you will see another entry in your boot menu:

image

Pros: I can run my virtualized environment with full access to 6GB of RAM and no overhead of running a host system.

image

Pros: Another benefit is that I dont have to go buy a Solid State drive to see the improved performance.

Pros: You can attach/managed any VHD using your Win7 Disk Management Console

Pros: The best part of this configuration = MULTIPLE MONITORS.... :)