I’ve got a backlog of articles that are in draft mode, waiting to be proof read and published, but this particular topic I wanted to take a minute and write about.
There is a whole slew of information out there for the best ways to create a Cloneable SharePoint 2007 Environment. Why might you want to do that? Well for our particular case, we do a lot of training here at Black Ninja, so depending on how many students we register, we like to provide each with their own isolated SharePoint 2007 environment.
In the past, we’ve done this a bit too manually for my liking. So this time around, I took some time and looked into our options for creating cloneable vm’s easily and without hassle. My starting point was Michael Sivers awesome blog post titled: “How to Create a Cloneable SharePoint Development Environment“. I followed his instructions to a point, and because I’m running a VMWare fusion environment, I had to tweak things a little bit. I also wanted to exclude the auto farm creation and deployment because I wanted to do those steps myself.
Software – Below is a list of software I used for my training VMs:
1. VMWare fusion for the mac, installed on my Mac Pro server that we use to host our VMs. This machine has 16GB of ram (soon to be 32GB) and an 8-core process.
2. Microsoft Windows Server 2003 Enterprise R2 with SP2
3. Microsoft SQL Server 2005 Developer Edition
4. Microsoft SharePoint Server 2007
5. Microsoft Visual Studio 2008 Professional
6. Visual Studio Extensions for WSS 1.3
7. Office Server SDK
8. SharePoint Designer 2007 with SP1
9. Firefox, Firebug and Web Developer extensions
10. Office 2007 Ultimate
11. Sysprep for Win2K3 SP2
Base Image – Below is a list of steps for creating the base image:
I used all of Michael’s steps except right before the Install Sysprep for Win2K3 SP2 step, I did the following:
1. Install SharePoint Designer 2007 with SP1
2. Install Firefox, Firebug and the Web Developer extensions
3. Install Office 2007 Ultimate
4. Run Windows Update
5. resume with Michael’s step: Install Sysprep for Win2k3 SP2
So what we’ve essentially just created is the base machine for all the other clone’s we’re going to create. The first step is to shut down this new VM and make a copy/backup of it. The reason we do this is because future training classes may require additional software, or patches and so you would spin up the backup, make the updates/installations and rerun Sysprep to create a new cloneable base.
So, Michael includes 3 files for your use that need to be configured before we run Sysprep: Sysprep.inf, startsql.bat and mossconfig.bat. In my case, I commented out the reference to mossconfig.bat in the Sysprep.inf file. I also made the changes to the startsql.bat file so that it uses the built in Administrator account.
Because I hadn’t used Sysprep in so long, I had no clue how to use it. In the end, I was able to find it in the deploy.cab file located in c:Windowssystem32.
I extracted the contents of the deploy.cab file to c:sysprep. I copied my modified Sysprep.inf and startsql.bat files to that location. From the command line, I navigated to c:sysprep and ran the following command:
sysprep -mini -quiet -reseal shutdown
Once my machine is shut down. I am ready to roll. Michael talks about Differencing .VHD files, but research seemed to indicate the VMWare Fusion equivalent was to simply copy the VM. So basically, to make clone’s of these VMs I simply copy and paste to make a copy. I rename the VM, start it up and walk through the prompts to configure the new server. Once that boots, I created a local user account: moss_farmsvc and ran the SharePoint Configuration Wizard. When prompted, I have it the moss_farmsvc account, specified the db server, and configured CA to run on port 8888. Voila, I’ve got one VM ready to go. Rinse and repeat until you’ve got enough VMs for all your students!