VMWare Workstation - Create a template virtual machine
A template (also called gold or master) virtual machine (VM) acts as a base VM which can be cloned to create virtual machines of same build and configuration. Thus, rather than going through the time consuming process of creating a VM from scratch, you can simply clone an existing VM to quickly stand-up a lab of multiple virtual machines.
Below are the steps, I usually take to build a Windows based template:
- Create a new VM of desired OS
- Apply Windows Updates
- Install base applications e.g. .Net 4, VMWare tools
- Make any configuration changes
- Enable desktop experience in Windows Server
- Change folder options – show hidden files, display file extensions
- Set time zone
- Install Telnet client
- Disable indexing on C for performance gains
- Change Internet Explorer settings
- Default page “about:blank”
- Disable Enhanced Security Configuration for administrators
- Run SysPrep and shutdown. Your template is now ready for use.
Create a new VM based on template
To create virtual machines based on a template use VMWare cloning to create a Full Clone rather than physically copying the VM files on hard disk. Full clone option in Workstation creates a completely independent virtual machine and is the recommended way to create multiple machines as it uncouples the new VM from some of the settings of template VM.
It’s important to run Sysprep as the last step of creating a template. Sysprep is a Windows tool that clears the unique settings of Widows Operating System to prepare the OS for deployment. Every Windows OS has settings like SID and Mac address which are unique to its own. After running Sysprep, when computer is booted first time, Windows configuration is run to generate the unique settings.
If you simply copy the Virtual Machine files, something that I have done before, without running Sysprep, you are going to get into difficulties when joining the computer to a domain due to the fact that you may have two computers with same SID or Mac address.
Sysprep tool comes with Windows and can be found on “C:\Windows\System32\Sysprep”.