VMware ESXi and vSphere Cluster Management
Create a Virtual Machine Template in VMware vSphere
Learn how to create a reusable VMware vSphere VM template by converting or cloning an existing VM, including disk provisioning and validation.
A virtual machine template is a reusable master image in vSphere. It provides a consistent starting point for deploying new virtual machines. A template commonly includes an operating system, current patches, baseline applications, virtual hardware settings, and organization-specific configuration.
A template is different from an ordinary virtual machine. A VM is normally running or editable in the inventory, while a template is a deployment source. You generally update a template through a controlled maintenance process and deploy new VMs from it rather than using it as an everyday workload.
Prerequisites and preparation
Perform this procedure in a vCenter Server-managed vSphere environment. The vSphere Web Client must provide access to the VMs and Templates inventory view and the source VM.
Prepare the source VM
- Identify the existing VM that will become the source image.
- Install required operating-system updates and patches.
- Install and validate baseline applications, agents, and configuration.
- Remove temporary files, installation media, caches, logs, and other unwanted data.
- Follow the organization’s guest operating-system generalization process where applicable. For example, ensure that identity, hostname, machine account, and application-specific settings will be handled correctly when a new VM is deployed.
- Shut down or otherwise prepare the guest according to your organization’s image-management procedure before starting the operation.
- Record the intended template name, destination folder, datastore, disk format, and compute placement.
Check capacity, access, and compatibility
- Confirm sufficient free space on the destination datastore. Thick disks reserve their full configured capacity, so they can require substantially more space than the currently used guest data.
- Confirm that the selected host or cluster can access the destination datastore.
- Verify storage policies, compatibility requirements, and any placement rules that apply to the destination.
- Confirm that your account has the required vCenter privileges for cloning, converting, placing inventory objects, selecting hosts or clusters, accessing datastores, and performing provisioning operations.
A host is an ESXi server that runs workloads. A cluster is a group of ESXi hosts managed together by vCenter. A datastore is storage made available to ESXi hosts for VM files and virtual disks.
Choose between Convert to Template and Clone to Template
The two actions have different effects on the source VM. Select the action based on whether the original VM must remain available.
Convert to Template
Convert to Template changes the source VM itself into a template. The ordinary VM is removed from the inventory and replaced by a template object. Its virtual disk files are retained; the operation does not provide a disk-format selection.
Use conversion when the source is a one-purpose golden-image VM and no ordinary copy is needed for testing, operation, or future editing.
Clone to Template
Clone to Template creates a separate template copy while keeping the original VM. The wizard lets you specify the template name, inventory destination, compute placement, storage destination, and virtual disk provisioning format.
Use cloning when you need to preserve a configured server, test the source image, operate it as a normal VM, or retain it for future modifications.
Method comparison
- Original VM retained: Convert to Template: no. Clone to Template: yes.
- Separate copy created: Convert to Template: no. Clone to Template: yes.
- Disk-format selection: Convert to Template: unavailable; the source disk files are retained. Clone to Template: available during the wizard.
- Effect on source VM disk files: Convert to Template: the source files become associated with the template. Clone to Template: a separate copy is created at the selected destination.
- Best use: Convert when the source VM is no longer needed as a normal VM. Clone when the original must remain available.
Convert an existing VM to a template
- Open the vSphere Web Client and go to the VMs and Templates inventory view.
- Locate the source VM.
- Right-click the VM and open All vCenter Actions.
- Select Convert to Template.
- Confirm the operation when prompted.
- Wait for the task to complete.
- Verify that the template appears in the intended inventory location.
VMs and Templates inventory > source VM context menu > All vCenter Actions > Convert to Template
After conversion, the original source is no longer available as a normal VM. The inventory should show a template in its place. If you need both objects, cancel before confirming if possible and use Clone to Template instead.
Clone an existing VM to a template
- Open the vSphere Web Client and select the VMs and Templates inventory view.
- Locate and right-click the source VM.
- Open All vCenter Actions and select Clone to Template.
- Enter a unique template name.
- Choose the destination inventory folder or other requested inventory location.
- Select the host or cluster that will host the template.
- Select the destination datastore when the wizard asks for storage placement.
- Choose the virtual disk provisioning format.
- Review the wizard summary carefully, then submit the operation.
- Monitor the task until it completes successfully.
- Search the inventory and verify that both the original VM and the new template are present.
VMs and Templates inventory > source VM context menu > All vCenter Actions > Clone to Template
Choose virtual disk provisioning
Virtual disk provisioning describes how a virtual disk’s capacity is allocated on a datastore. The choice affects initial storage consumption, creation time, and operational planning.
Same format as source
This option preserves the source VM’s virtual disk provisioning format. It is useful when the source storage format is already approved and you want the cloned template to match it. Inspect the source format first so that the result is not surprising.
Thick Provision Lazy Zeroed
A thick lazy-zeroed disk reserves its full configured capacity when created. Existing blocks are not all zeroed in advance; blocks are initialized when they are first written. Creation is generally faster than eager-zeroed provisioning, but the full capacity must be available on the datastore.
Thick Provision Eager Zeroed
A thick eager-zeroed disk reserves its full configured capacity and zeroes all blocks during creation. Creation can take longer, especially for large disks, but the disk is fully initialized before use. Select it when required by workload, policy, or storage design.
Thin Provision
A thin disk initially consumes datastore space based largely on blocks actually used rather than the full configured capacity. It can reduce initial storage consumption and make creation faster, but the disk grows as data is written.
Thin provisioning requires active monitoring. A datastore can run out of free space if multiple thin disks grow beyond the available capacity. Track datastore free space and growth, and account for snapshots, replication, backups, and other storage consumers.
Provisioning comparison
- Same format as source: capacity allocation, zeroing behavior, and datastore impact follow the source disk. The main consideration is preserving an existing storage design.
- Thick Provision Lazy Zeroed: full capacity is allocated; blocks are zeroed on first write. It requires full capacity immediately and usually has a shorter creation time than eager zeroed.
- Thick Provision Eager Zeroed: full capacity is allocated and zeroed during creation. It can take longer to create and requires full capacity immediately.
- Thin Provision: capacity grows as blocks are used. It lowers initial consumption but requires monitoring and careful overcommit planning.
Validate the completed template
- Confirm the template name is correct.
- Confirm the inventory location or folder.
- Confirm that the object is shown as a template rather than a normal VM.
- Confirm the original source VM was retained or removed as intended.
- For a cloned template, verify its datastore placement and expected virtual disk provisioning format.
- Review Recent Tasks to confirm that the operation completed successfully.
- Search the VMs and Templates inventory if the object is not visible in the expected folder.
Templates should be maintained through a controlled update process. When the operating system, patches, applications, or organizational configuration changes, update the approved image, validate it, and document the revision before using it for new deployments. The next lifecycle action is to deploy a new VM from the template and apply any guest customization required by the environment.
Troubleshooting
The template action is unavailable
Confirm that you selected an eligible VM rather than a template or another inventory object. Verify that you are connected to the required vCenter Server and that your account has privileges for the operation. Missing permissions for cloning, conversion, inventory placement, or provisioning can hide or disable the action.
The clone task fails during storage placement
Check destination datastore free capacity, especially when using thick provisioning. Verify that the selected host or cluster can see and use the datastore. Also review storage policies, compatibility requirements, and placement rules.
The original VM cannot be found
Conversion was probably used. Convert to Template replaces the normal VM with a template. Use Clone to Template when the original VM must remain available.
The template uses more storage than expected
Inspect the virtual disk format. A thick option reserves the full configured capacity, and Same format as source may have retained a thick source format. Select an approved format for future clones, subject to organizational storage requirements.
The template is not in the expected folder
Review Recent Tasks to determine whether the creation task is still running or failed. Then search the VMs and Templates inventory and confirm the destination selected in the wizard.
Exam-relevant notes
- Convert to Template changes the source VM into a template and does not retain a normal VM.
- Clone to Template creates a separate template and retains the source VM.
- Disk-format selection is available during Clone to Template, not during Convert to Template.
- Thick provisioning reserves the full configured capacity; eager zeroed also initializes the blocks during creation.
- Thin provisioning can reduce initial datastore consumption but requires ongoing free-space monitoring.
- vCenter Server, inventory permissions, datastore access, and compatible host or cluster placement are necessary for a successful workflow.
For a reusable image that must coexist with its source, choose Clone to Template. For a dedicated image VM that should become the master template with no ordinary copy retained, choose Convert to Template.