This morning I decided to create a new template for Server 2012 R2 since I’ve been restricting a lot of the components of the TDSheridan Home Lab. I created a new virtual machine and installed Server 2012 R2 Datacenter then ran all windows updates on it.
The virtual machine itself it configured with the following settings.
- 2 CPU Cores (1 per socket)
- 4GBs of RAM
- 40 GBs Hard drive (Thin Provisioned)
- VMWare Paravirtual Controller
- VMXNET3 Ethernet adapter
- VM Hardware Version 11
With this set up it gives me a flexible from a deployment standpoint. While the template is sitting there not doing anything it doesn’t take up that much space, but when I go to deploy it if I need to expand the drive or make it thick provisioned I can easily do it.
As far as the windows configuration goes I renamed that server to Template and enabled remote desktop. I have not joined it to the domain. I wanted to keep the template generic because depending on what customizations you choose to do through the VMWare and/or Windows Products you have this can change how you configure the base template.
Under vCenter 6.5 you have 3 options for creating a template
- Convert to template
- The virtual machine needs to be powered off
- vCenter converts the virtual machine to a Template (single Instance)
- Clone to Template
- The virtual machine can be On or Off
- Creates a second copy of the VM that is marked as a template
- Allows you to customize some aspects of the VM during the cloning process
- Clone to Template in Library
- This involves a bigger conversation about Libraries that I’ll touch on in a different post.
Tips about for Cloning:
- Remove and ISO, Floppy, or removeable media from the virtual machine before you clone it
- Powered off VMs always clone faster than Powered on VMs.
Cloning to Template Process:
Right click on the Virtual Machine and go to Clone and then Clone to Template.
A wizard will open that is very similar to the new Virtual Machine wizard.
Select your Give your template a name and select your datacenter then click Next.
The second page asks you which Host you want to assign CPU and Memory from. In my set up I have 2 hosts and either would work in my generic example. Keep hardware considerations in mind if you’re creating a more specialized Template.
Select a host and Click Next.
Most of the time if you get a Compatibility Warning on this page, it’s because you have an ISO or removable media attached to VM that is not accessible from the selected Host. Always remove those items from the Virtual Machine before cloning/Templating.
On the Storage page of the wizard you can select where to storage the Template and you can change the hard drive provisioning as well.
Make your location and provisioning choices and click Next.
The last page of the wizard is an overview of everything you selected for the cloning to Template operation. If there is a mistake click Back and fix the mistake. If Everything is correct click Next to start the cloning process.
In the recent tasks section of vCenter you’ll be able to watch the process.
When the Cloning process is done, you’ll see it listed under the Virtual Machine view in vCenter. To use it all you have to do is right click on it and select “New VM from This Template.”
Convert to Template:
Power off the Virtual Machine.
Right click on the Virtual Machine, and go to Template and then Convert to Template.
You’ll get a prompt confirming that you want to convert the virtual machine to a Template. Click Yes.
After you click Yes you will see the task under recent tasks complete immediately.
Now the Original virtual machine has been converted to a template.
I hope you had fun learning about Templates to today and I hope that templates save you time in the future.
To take this to the next click here to see how to make Customization Specification to automate post installation tasks.
And to put it all together Click Here to deploy a template with a customization specification.