Creating new Windows VMs can be time consuming due to having to create the VM, install the Operating System, and then having to install Gigs of patches which can be time consuming. In this post today I will show you how to create a Windows Server 2012 R2 Template VM which can be cloned to create new VMs in order to speed up the process of deploying a new VM in VMWare Workstation 11.
Creating a Windows Server 2012 R2 Template VM in VMWare Workstation 11
1) Create your VM, install the Operating System, and run Windows Updates in order to have latest patches installed.(I assume you know how to do this.)
2) Once the VM is in the state you want. Open up the command Prompt as a Administrator.
3) In the Command Prompt, run the following command in order to clean up the old Patches and Updates.
dism /online /cleanup-image /StartComponentCleanup /ResetBase
4) Once the cleanup is done, go to “C:\Windows\System32\sysprep” folder in the Command Prompt and then run the following command.
sysprep
5) In the SysPrep Tool Window, Make sure “Enter System Out-of-Box Experience (OOBE)” is selected, the “Generalize” box is checked in, and in Shutdown Options select “Shutdown”. Once done, click on “OK”.
6) Sysprep will begin to prepare the OS. Once it is finished, the VM will shut down.
7) In the VMWare Workstation 11 Window, Right Click on the VM that is your Template, go to “Snapshot” and select “Take Snapshot”.
8)In the Take Snapshot Window, name your Template Snapshot and then click on “Take Snapshot”.
9)Once the Snapshot is complete, Right Click on the VM that is your Template and go to “Settings”.
10) In the VM Settings Window, go to the “Options” Tab. Look for “Advanced” in the Settings Window and in there make sure the “Enable Template mode (to be used for cloning)” box is checked in. Once that is done, click on “OK”.
11) In the VMWare Workstation 11 Window, Right Click on the VM that is your Template, go to “Manage” and then click on “Clone”.
12) The Clone Virtual Machine Window will come up and click on “Next”.
13) Make sure the Template Snapshot is selected and click on “Next”.
14) Select the Clone type you want to use. In this example we will “Create a Full clone”. Once selected click on “Next”.
15) Select where you want to store the Cloned VM and then click on “Finish”.
16) Wait for the Cloning process to finish.
17) Once the Cloning is finished, this Window will pop up. You can click on “Close”.
18) You can now power on your Cloned VM and do the initial Windows Setup.
I hope this has been useful for all of you 😀 .