Creating a cloneable SharePoint 2010 Development Environment with PowerShell, Windows Sysprep, and SQL Server 2008 R2 Sysprep – PART 1

by josh 26. March 2010 02:53

In the previous post, I outlined the steps involved in creating a cloneable image that can be quickly spun up into a working SharePoint 2010 development machine. In this post, I want to visit Steps 1-5 in more detail.

 

  1. Install a virtual machine with Windows Server 2008 R2, PowerShell 2.0 and all other desired client software (Visual Studio, Office, SharePoint Designer, etc…)
  2. Install SQL Server 2008 R2 as a Prepared Image
  3. Install SharePoint 2010 Prerequisites (http://technet.microsoft.com/en-us/library/cc262485(office.14).aspx) either manually or using the Prerequisites Installer tool
  4. Install SharePoint 2010 bits, but DO NOT run configuration wizard
  5. Run Sysprep.exe to prepare server

 

Step 1 – Install OS and Client software

I won’t go into a whole lot of detail on this step because it should be pretty straightforward. For my SharePoint 2010 development machine I run Windows Server 2008 R2 and the following client software:

  • Visual Studio 2010
  • SQL Management Studio
  • Office 2010 (including Visio Premium for workflow visualization)
  • SharePoint Designer 2010
  • Other useful tools (Reflector, U2U CAML Query tool, CodeRush/Refactor Pro, …)

Step 2 – Install SQL Server 2008 R2 as a Prepared Image

**This is a feature of R2. SQL Server 2008 (pre-R2) does not have the Sysprep functionality.

Performing these steps will install the SQL Server 2008 R2 bits and prepare the server to be configured at a later time.

  1. Run the SQL Server 2008 R2 setup executable.
  2. On the Installation Center dialog, choose Advanced from the menu on the left. 
    sql installation center
  3. Click the Image preparation of a stand-alone instance of SQL Server link. 
    sql installation center - prepare image
  4. When the System Configuration Checker completes, click OK.
  5. Accept the license terms and click OK.
  6. On the Setup Support Files screen, click Install.
  7. When the setup files are installed, click Next and choose the features to be installed. 
    sql install feature sel
    **Only server features are available as part of the image preparation. Client features, such as Management Studio, can be installed normally before running Sysprep on the machine.
  8. On the Instance Configuration screen, enter an Instance ID for the instance being prepared. This will be required when completing the image after cloning. 
    sql installation center - instance config
  9. On the Disk Space Requirements screen, review requirements and click Next.
  10. On the Prepare Image Rules screen, verify that there are no errors or warnings and click Next.
  11. On the Ready to Prepare Image screen, review settings and click Prepare.
  12. On the Complete screen, click Close.

Step 3 – Install SharePoint 2010 Prerequisites

SharePoint 2010 includes a new Prerequisites installer that will automatically download and install the necessary prerequisites. Of course, you must be connected to the internet for the prerequisites to be downloaded. You can alternatively download the prerequisites manually and install them one-by-one. (http://technet.microsoft.com/en-us/library/cc262485(office.14).aspx)

  1. Open the SharePoint 2010 installation media and run PrerequisiteInstaller.exe.
  2. Review the prerequisites that will be installed and click Next
    spprereq1
  3. Accept the license terms and click Next.
  4. When the installation completes, click Finish.
  5. Restart the VM.

Step 4 – Install SharePoint Server 2010 Binaries

  1. Open the SharePoint 2010 installation media and run Setup.exe.
  2. Enter the license key and click Continue.
  3. Choose Server Farm install.
  4. On the Server Type screen, choose Complete and click Install Now.
  5. When installation is compl ete, on the Run Configuration Wizard screen, clear the Run the SharePoint Products Configuration Wizard now checkbox and then click Close
    sharepoint install 1

Step 5 – Run Sysprep to Prepare Machine for Cloning

  1. Navigate to C:\Windows\System32 and run Sysprep.exe
  2. In the System Preparation Tool dialog, in the System Cleanup Action section, choose Enter System Out-of-Box Experience(OOBE) and select the Generalize checkbox.
  3. In the Shutdown Options section, choose Shutdown and click OK
    sysprep dialog
  4. Sysprep will configure the machine and then automatically shut down.

The base virtual machine image is now ready to be cloned. I’ll detail the process of cloning the VM and scripting the configuration of SQL Server and SharePoint in the next post…

blog comments powered by Disqus