Sysprepped SharePoint 2010 Development Image

SharePoint 2010 is here and it’s time to do things right this time around. To me, doing it right means that everything I do should be reusable. Those reusable components may be for our internal developers or it may be something that the sales team can run with but either way that’s the goal.

The requirements

When it came time to put together the image that would be reused for all the developers across the company we needed a solution a little bit more robust then the solution we used for SharePoint 2007. Below are some of our requirements:

  1. Consistent installations between environments
  2. Follow best practices where possible (development environments historically break this rule for ease of use)
  3. Unique computer name for each person to avoid network collisions
  4. Automated installation to allow for quick spin up of development environments
  5. Should use VMware (We recently transitioned everything from Virtual PC to VMware due to 64bit requirements)

In addition to these requirements we also put in place some new machine requirements for all developers. At a high level this includes 8 GB of ram and quad core processors. The developer has input for the remaining specs.

Setting up the base image

Base image is created in VMware workstation. I use snapshots to manage the different stages of the virtual. The main snapshots are “Base” and “Sysprepped” as shown below.

If we need to make changes then I’ll update the base, retake the snapshot and perform another Sysprep. Josh Meyer posted a great tutorial on his blog that was very helpful. Do be aware that the ability to Sysprep SQL Server 2008 is an R2 ONLY feature. Josh’s guide will get you most of the way there but you’re still going to need to complete the SQL Server installation and complete the configuration of SharePoint. What if we could take this one step further and automate both of those installs so that all the user needs to do is rename the box and run some ready to go PowerShell scripts? We can… I did… and we’ve been using this process to spin up 2010 development environments for about 6 months. (I’m just now blogging about it because I just refreshed the image the other day).

The process is pretty straight forward:

  1. Install windows
  2. Install SQL (as a prepared image)
  3. Install SharePoint prerequisites
  4. Install SharePoint (files only, do not run configuration wizard)
  5. Install additional software / utilities / configurations (See the section below to see what we decided to put on our image)
  6. Copy the SQL Server installation media into the virtual (now it’s self contained)
  7. Set up batch process to complete the SQL Server installation. (Download included at the bottom of the post)
  8. Set up a batch process to complete the SharePoint Server installation. I decided to use a modified version of AutoSPInstaller from CodePlex. I had to add some code to automatically convert localhost to the machine name for user accounts and I also removed some code that checked if SharePoint was already installed because I was having trouble with it.
  9. Sysprep – Run the sysprep utility and choose “Enter System Out-of-Box Experience(OOBE)”, “Generalize” and “Shutdown”.

The great thing about the SharePoint installation script is that you end up with a SharePoint environment that is ready to go. We automate the installation of the following:

  • Central Administration
  • Portal Web App
  • Managed Metadata
  • State Service
  • WSS Usage Service
  • Secure Store Service
  • State Service
  • Search Service
  • Sandbox Code Service

Note: All of this is set up on a local machine (no domain). I’ve found that keeping the domain controller off the machine makes for a much lighter weight installation. I’m now working on the variation of this machine that includes the domain so some of the additional features such as User Profile Service will be functional.

The guts of the image

Software Installed

  • Windows Server 2008 R2
  • SQL Server 2008 R2 (Prepared image)
  • .Net Framework 3.5.1
  • Internet Explorer 8
  • Office Professional 2010 (32bit)
  • Excel PowerPivot Addin
  • Visual Studio 2010 (with CKS:Dev and SPPowerTools)
  • IIS 7.0
  • SharePoint Server 2010 Prerequisites
  • SharePoint Server 2010 (Installed but no configuration wizard run)
  • FireFox 3.6.10
  • SharePoint Designer 2010 (32bit)
  • Visio 2010 Premium (32bit)

Additional Configuration

Utilities Installed

If you are curious as to what some of these utilities are then you will find most of them in my previous blog post about 10 Essential Developer Tools for SharePoint 2007.

Accounts Used

Administrator Used for running of installation scripts. Local administrator. SA on database.
companyname Used for working with / demoing system. Avoid logging in as Administrator for day to day use.
SQLService SQL service account.
SPFarm SharePoint farm / database access account.
SPService SharePoint service account.
SPPortalApp SharePoint account for portal web application.
SPMySiteApp SharePoint account for my site web application.

Spinning up an environment

Ok. So now you need to spin up a new development environment… what does the process look like?

  1. Download and boot the VMware image
  2. Log in as Administrator
  3. Set the Administrator password (it is cleared out due to being sysprepped)
  4. Rename the machine to something unique (We use SP2010-INITIALS)
  5. Reboot (Due to renaming)
  6. Run the SQL installation script (link on the desktop)
  7. Run the SharePoint installation script (link on the desktop)
  8. Run the AutoLogin registry key to avoid future login prompts (link on the desktop)
  9. Log out
  10. Log in as CompanyName account (No longer use Administrator for any purpose)
  11. Enable Intranet settings within Internet Explorer (add machine name to intranet settings if needed)

This whole process takes roughly 20 minutes once you have the virtual in hand.

Download SQL Installation Script

I'm a public speaker and the Chief SharePoint Architect for Eastridge, a Microsoft Gold Partner specializing in SharePoint and custom application development in Winston-Salem, NC. I focus on the SharePoint platform with a specialty in Information Architecture, Publishing and Best Practices.

Got something to say? Go for it!