
Creating Templates and Clones
Learner Objectives
After completing this lesson, you should be able to meet the following objectives:
- Create a template of a virtual machine
- Deploy a virtual machine from a template
- Clone a virtual machine
- Create customization specifications for guest operating systems
About Templates
A template is a master copy of a virtual machine. You use templates to create and provision new VMs.
A template typically includes:
- A guest operating system
- One or more applications
- A specific VM configuration
- VMware Tools
Creating a Template: Clone VM to Template
You can create templates using different methods. One method is to clone the VM to a template. The VM can be powered on or off.
Creating a Template: Convert VM to Template
You can create a template by converting a VM to a template. In this case, the VM must be powered off.
Creating a Template: Clone a Template
You can create a template from an existing template, or clone a template.
Updating Templates
You update a template to include new patches, make system changes, and install new applications.
To update a template:
- Convert the template to a VM.
- Place the VM on an isolated network to prevent user access.
- Make appropriate changes to the VM.
- Convert the VM to a template.
Deploying VMs from a Template
To deploy a VM, you must provide information such as the VM name, inventory location, host, datastore, and guest operating system customization data.
Cloning Virtual Machines
Cloning a VM creates a VM that is an exact copy of the original:
- Cloning is an alternative to deploying a VM.
- During cloning, the VM can be powered on or off.
Guest Operating System Customization
You customize the guest operating system to make VMs, created from the same template or clone, unique. By customizing a guest operating system, you can change information, including the following details:
- Computer name
- Network settings
- License settings
- Windows Security Identifier
About Customization Specifications
You can create a customization specification to prepare the guest operating system:
- Specifications are stored in the vCenter Server database.
- Windows and Linux guests are supported.
Customizing the Guest Operating System
When cloning a VM or deploying a VM from a template, you can use a customization specification to prepare the guest operating system.
About Instant Clones
You can use Instant Clone Technology to create a powered-on VM from the running state of another powered-on VM:
- The processor state, virtual device state, memory state, and disk state of the destination (child) VM are identical to the states of the source (parent) VM.
- Snapshot-based disk sharing is used to provide storage efficiency and to improve the speed of the cloning process.
Use Cases for Instant Clones
Instant clone VMs have various uses:
- Virtual desktop infrastructure
- Rapid scale-out: Container hosts, big data, and Hadoop worker nodes
- DevTest: Quickly and efficiently replicate VMs and test beds with the same running state
- DevOps: Replicate VMs from staging to production, and the converse, with the identical running state
In vSphere 6.7 and later, you can create instant clones of VMs only through API calls. In vSphere 7, instant clone guest customization is supported (Linux only).
Review of Learner Objectives
After completing this Creating Templates and Clones lesson, you should be able to meet the following objectives:
- Create a template of a virtual machine
- Deploy a virtual machine from a template
- Clone a virtual machine
- Create customization specifications for guest operating systems