When creating a new virtual SharePoint farm, several servers will be required in most cases:
- AD – if the farm is in a lab or is in a completely greenfield environment
- SQL – Not essential in a research/development environment, but usually essential in most other environments
- SharePoint – At least one SharePoint machine will be required and depending on the environment and scale, multiple machines will be required
- Office Web Apps – Not essential but often required
- Workflow Manager – Again, not essential but often required
A simple but essential step when creating a new VM is to install the operating system. In most cases, this is a step that is identical in the build for each VM.
This step can be bypassed very easily by installing the OS on a VM and then using the sysprep tool to generalise the settings to allow the VHD to be copied and used in new VMs.
The steps are very straightforward:
- Create a new VM
- Install the OS
- Log into the VM
- Open a command prompt as an administrator
- Change to %WINDIR%System32sysprep directory
- Run the following command sysprep /generalize /oobe /mode:vm
The command will run and the VM will shut down. After this the VHD can be copied and a new VM can be created with the copied VHD.
When the VM is started for the first time the following screen will be displayed:
For more information on sysprep see http://technet.microsoft.com/en-us/library/hh825033.aspx