Home > SSW Standards > DeveloperSharePoint > SSW SharePoint VM Development
Do you agree with them all? Are we missing some?
Let us know what you think.
-
Do you know to develop inside a VM?
All SharePoint customization and development must be done on a Virtual Machine.
More info on setting up SharePoint VM
-
What are the different Virtual Machine images available?
We have three types of VM images around the office.
- The master.vhd is for upgrading future VMs and sysprep VM's are built
from the master.vhd
The master.vhd is versioned (e.g. master_v8.vhd) to
track which version it is, and to assist us in upgrading the master image.
- The sysprep.vhd is the one that we use to create a new SharePoint server
When you run the sysprep.vhd it will create a new SharePoint server. Always make a copy of this to your own machine. The sysprep.vhd is versioned (e.g. sysprep_v8.vhd)
- You may find various other VM's created from sysprep.vhd and used for various
projects or experiments
These images are
usually renamed but kept the original version number that it was created from.
(e.g. sswsp_v8.vhd)
-
How do I create my own SharePoint VM?
When you want to create a SharePoint environment, you would need to create a new Virtual
Machine from the SysPrep image.
- Make a copy of the latest version of sysprep.vhd and do not run the base one
- Rename sysprep.vhd so that it says what you are using it for.
e.g. client_project_v7.vhd
- You will retain the version number so can we know from which sysprep.vhd it was
made from
- In Hyper-V or Virtual PC, you create a new VM and link it to your copy of the sysprep.vhd
- You will need to allocate 2GB of RAM for this image
- You will need plenty of hard drive space (at least 25GB to 30GB)
- You will also need time - it is best to run this on a different machine if you plan
to use your laptop at the same time when you are setting up this Virtual Machine
- You want to have the undo disk off initially, so that the installation commits changes directly
to the VHD. Start the VM
- Once the VM starts up, you will be asked to log on - use our SharePoint dev password
for the administrator account
- Setup scripts will run for the administrator - this will rename the machine and
install SQL Server
- When the process is completed, the machine will restart, and prompt you to logon
again as the MOSSFarm account - use our SharePoint dev password for the MOSSFarm account
- A second set of setup scripts will run for this account - this will install MOSS,
SP1
- When this is done, power down the VM, and commit all changes to disk
- Consider setting up either snapshots or undo-disk at this point.
-
What does a SharePoint image need?
As a minumum, the SharePoint image needs:
- Windows Server 2003 or 2008
- SQL Server 2005 sp1
- WSS 3.0 sp1
- MOSS 2007 sp1
- MS Office SharePoint Designer sp1
- Visual Studio .NET 2005 or 2008
-
How do I update and create a new version of the Sysprep VM?
When MS releases a new service pack, or new Windows update, we install these
to the master image and create a new version of the Sysprep image for future
VMs.
- Update SQL Server service packs
- Update Windows Server 2003 service packs
- Update Windows
- Update VS.NET service packs
- Update SharePoint service packs
- Update MS Office SharePoint Designer service packs
To create a new VM:
- Make a copy of the master.vhd, rename it to the next version
- Create a VM using this new vhd
- Copy additional setup files to D:\install\
- Modify the scripts in D:\scripts\
- When finished, power down the VM. Make a copy of this and rename it to sysprep-vNext.vhd
- Create a new VM using this new vhd
- Start it up, and then run the sysprep command in D:\sysprep\
- This will generalize the computer's settings and shut it down
- Don't start up the VM again - or it'll run the start up scripts
- Zz old copies of the master.vhd and sysprep.vhd
-
How does the sysprep process work, what does the scripts do? Why is this process
so complicated ?
- SharePoint server can't be renamed after SharePoint is installed
- Multiple VM's with the same name can't be powered up in the same network
- So the master.vhd contains:
- Windows 2003 server SP2
- Visual Studio .NET 2005
- Microsoft Office SharePoint Designer
- When sysprep is ran on the master.vhd, it generalises Windows 2003 server (generate
new machine guide, rename computer, etc), the scripts that run also puts "administrator"
into the registry so that'd be the name of the next login prompt. A vhd that is
in this state is the "sysprep'ed" vhd
- When it restarts and the user logs in with administrator, it then runs the script
to install
- SQL Server 2005
- Puts MossFarm account into registry
- After restart - log on with MossFarm account and run the scripts to install
- SharePoint 2007 sp1
- Runs Moss\Post_Build.cmd
Acknowledgements
John Liu