VMware ESXi and vSphere Cluster Management

Deploy a Virtual Machine from a Template in VMware vSphere

Learn how to deploy a VM from a vSphere template, select inventory, compute, storage, and customization settings, then validate the new virtual machine.

What a VM Template Does

A virtual machine (VM) is a software-defined computer with virtual CPU, memory, disks, network adapters, and a guest operating system. A VM template is a reusable master image used as a standardized source for deploying additional VMs.

Templates commonly contain a guest operating system, approved patches, VMware Tools, virtual hardware settings, baseline software, and default configuration. Deploying from a template is faster and more consistent than manually creating and configuring every VM.

The deployment process creates a separate VM. The new VM does not operate directly from the template, and changes made to the deployed VM do not normally change the template. Treat the template as a controlled source image and maintain it separately.

Prerequisites

  • Access to a vCenter Server environment through the vSphere Web Client or the newer vSphere Client interface. vCenter Server centrally manages ESXi hosts, clusters, inventory objects, templates, and VM operations.
  • An existing VM template in the vCenter inventory.
  • Permissions to deploy VMs, create or place objects in the required inventory folders, select compute resources, use datastores, connect networks, and apply customization specifications when required.
  • Available CPU, memory, storage, and network capacity in the target environment.
  • A suitable guest operating system customization specification if the deployed VM needs a unique hostname, network identity, domain membership, or other in-guest settings.
  • Basic knowledge of datacenters, folders, ESXi hosts, clusters, datastores, IP networking, DNS, VMware permissions, and guest customization specifications.

Information to document first

  • Source template name and version
  • New VM name
  • Target datacenter and VM folder
  • Target cluster, ESXi host, or resource pool
  • Target datastore or storage policy
  • Network or port group assignment
  • Customization specification name
  • Hostname, IP addressing method, DNS servers, gateway, and domain or workgroup settings
  • Whether the VM should power on automatically after deployment
  • Post-deployment validation steps and ownership

Understand the Deployment Destinations

Several wizard pages ask where different parts of the VM should be placed. These destinations have different purposes. A VM folder organizes objects in the inventory; it does not determine the ESXi host that runs the VM or the datastore that stores its files.

Destination typePurposeTypical selection criteriaCommon misconception
VM folderOrganizes VMs and templates in the vCenter inventory.Choose the folder matching ownership, environment, role, or lifecycle.The folder does not select compute or storage.
DatacenterTop-level vCenter container grouping hosts, clusters, VMs, networking, and storage.Select the datacenter containing the approved target resources.A datacenter is not the same as a datastore.
ESXi hostPhysical server running the VMware hypervisor and providing VM compute resources.Check CPU, memory, compatibility, maintenance state, and network access.The host is not where VM files are necessarily stored.
ClusterGroup of ESXi hosts managed as a shared compute resource.Consider capacity, policies, compatibility, admission control, and DRS.A cluster is not a single physical server.
Resource poolLogical allocation of CPU and memory within a host or cluster.Use the approved pool for the workload and verify its available resources.A resource pool does not provide storage.
DatastoreStorage for VM configuration files, virtual disks, snapshots, and related files.Check capacity, accessibility, performance, policy, and redundancy.The datastore is not the inventory folder.

Start Deploying from the Template

  1. Open the vCenter inventory in the vSphere Web Client or vSphere Client.
  2. Navigate to the VM Templates inventory area, or to the folder containing templates.
  3. Locate and select the intended template.
  4. Start the Deploy from Template action. Depending on the vSphere version and interface, this may appear in a context menu or as an action button.
  5. Confirm the selected template before continuing. This is especially important when templates exist for multiple operating-system versions, environments, or application baselines.

Deployment Wizard: Name and Inventory Location

Enter a unique name for the new VM. Use a naming convention that identifies useful attributes such as workload, environment, operating system, role, location, or sequence number.

For example, APP-PROD-01 can identify an application server in production, while a longer convention might include location and operating system. Follow the naming standard used by your organization and verify that the name is not already used by another VM, hostname, or domain computer account.

Next, choose the target datacenter and VM folder. The folder controls how the VM appears in inventory and who can manage it through folder-based permissions. It does not choose the runtime host or storage location.

Choose the Compute Resource

Select an eligible ESXi host, cluster, resource pool, or other compute placement option. An ESXi host is a physical server that runs VMs. A cluster is a group of ESXi hosts managed together as a shared compute resource.

Evaluate the following before choosing:

  • Available CPU and memory, including reservations, limits, and current workload.
  • Virtual hardware compatibility between the template and the available hosts.
  • Host maintenance mode, alarms, connection state, and admission-control requirements.
  • Network availability and access to the required port groups.
  • Cluster policies and workload placement rules.
  • Whether the cluster uses DRS. Distributed Resource Scheduler (DRS) can recommend or automate placement across hosts when configured.
  • Whether the VM may need vMotion or cluster protection services later.

If you select a cluster, vSphere may place the VM on an eligible host automatically or allow DRS to make the placement decision. If you select an individual host, that host must satisfy the template's compatibility and resource requirements.

Choose the Datastore

Select the datastore where the new VM's configuration and virtual disks will reside. A datastore is storage made available to ESXi hosts for VM files.

Check:

  • Free capacity for the virtual disks, configuration files, snapshots, and deployment overhead.
  • Datastore accessibility from the selected host or from all relevant hosts in the cluster.
  • Performance tier, such as general-purpose, high-performance, or development storage.
  • Storage policy requirements, including availability, encryption, replication, or redundancy.
  • Compatibility with planned operations such as vMotion, backup, or cluster protection.

vMotion moves a running VM between compatible hosts. Shared storage and compatible network configuration are commonly required when the VM may move between hosts, so verify that the selected datastore is accessible throughout the intended cluster.

Review Clone and Deployment Options

The wizard then presents deployment or clone options. The exact pages and labels vary by vSphere version, template type, storage configuration, and environment policies.

Review options such as virtual hardware, network connection state, disk format or placement, power-on behavior, and any available guest operating system customization. Do not submit the job until the name, folder, compute destination, datastore, network, and other selected settings have been checked.

Wizard stageRequired selectionWhat it controlsKey validation question
VM name and folderUnique VM name, datacenter, and VM folderIdentity and inventory organizationIs the name unique and is the folder approved?
Compute resourceHost, cluster, or resource poolWhere the VM receives CPU and memory resourcesDoes the destination meet capacity, compatibility, and policy requirements?
DatastoreDatastore or storage policyWhere VM configuration and disk files are storedIs there sufficient, accessible, and suitable storage?
Clone or deployment optionsHardware, disk, network, and power settings as presentedHow the new VM is created and connectedAre the selected settings appropriate for this workload?
Guest OS customization specificationExisting matching specification, if neededIn-guest identity and operating-system personalizationDoes the specification match the template's guest OS?
Final reviewConfirm the summary and submitStarts the deployment taskHave every destination and option been checked?

Customize the Guest Operating System

Guest OS customization personalizes a deployed VM's in-guest configuration while preserving the standardized template. It is separate from cloning: deployment creates the VM, while customization changes identity and operating-system settings inside that VM.

Use an existing customization specification when each deployed VM must have unique settings. Common values include:

  • Computer name or hostname
  • Static or DHCP network settings
  • IP address, subnet, gateway, and DNS servers
  • Domain or workgroup membership
  • Administrator credentials
  • Time zone and licensing data
  • Linux hostname, identity, user, SSH, and network settings

Enable the customization option in the wizard and select the specification that matches the template's guest OS. The template must contain a supported operating system, and relevant VMware Tools or guest customization components must be installed and functioning. A mismatch, missing tools, or incomplete guest configuration can prevent customization from completing.

When customization is not selected, the VM can still be deployed. This is appropriate when an administrator will configure the guest manually or when a separate configuration-management workflow will run. Before connecting such a VM to a production network, remove any duplicate hostname, IP address, machine identity, or domain account inherited from the source.

Windows server example

Choose an approved Windows Server template, name the VM APP-PROD-01, place it in the production application-server folder, and select the production cluster and an appropriate datastore. Apply a Windows customization specification with a unique computer name, static IP settings, DNS servers, time zone, and domain membership. After deployment, verify VMware Tools, domain membership, IP connectivity, and application services.

Linux development example

Use a Linux template maintained for development, place the VM in the development folder and cluster, and select storage suited to non-production performance and retention requirements. Apply a Linux specification for hostname, network configuration, user or SSH settings, and time zone. Confirm that the VM boots, resolves DNS, and has a unique network identity.

Finish and Monitor the Deployment

  1. Review the wizard summary carefully.
  2. Submit the deployment task.
  3. Monitor Recent Tasks for progress and completion.
  4. Inspect task details, events, alarms, and errors if the task pauses or fails.
  5. Confirm that the new VM appears in the expected inventory folder.
  6. Verify the intended host or cluster, datastore, virtual hardware, network, and power state.
  7. Power on the VM when appropriate and confirm that the guest operating system starts successfully.

Post-Deployment Validation

Validate both the vSphere object and the guest operating system before handing the VM to users or placing it into production.

Validation itemExpected resultWhere to verifyIf unsuccessful
VMware Tools statusTools is installed, running, and reporting normally.VM summary and guest operating system.Install, repair, or update Tools and review guest logs.
HostnameThe expected unique hostname is present.Guest OS and customization results.Correct the specification or rename the guest before production use.
IP configurationExpected address, gateway, DNS, and addressing method are active.Guest network settings and VM network adapter settings.Check the specification, port group, VLAN, and guest configuration.
DNS resolutionForward and reverse resolution work as required.Guest network tests and DNS tools.Correct DNS settings, records, routing, or firewall rules.
Domain or workgroup membershipThe VM has the expected membership and trust state.Guest OS identity settings and directory service.Check credentials, DNS, time synchronization, and duplicate computer accounts.
Guest customization task statusCustomization completed without errors.Recent Tasks, events, and guest logs.Match the specification to the OS, verify Tools, and redeploy or re-customize.

Also confirm the VM name, folder, compute location, datastore, virtual CPU and memory, disk layout, network adapter connection, port group, application installation, service status, patch level, backup registration, monitoring, and security controls.

Troubleshooting Common Problems

Template is not visible or deployment is unavailable

Possible causes include selecting an object that is not actually a template, looking in the wrong inventory location, using the wrong vCenter context, or lacking required privileges. Confirm the object type and location, verify the active vCenter and datacenter, and review permissions for template deployment and VM inventory creation.

Host or cluster cannot be selected

Check CPU and memory availability, host compatibility, maintenance mode, cluster alarms, admission control, placement policies, and permissions. A cluster with no eligible hosts cannot accept the VM until the resource or compatibility constraint is corrected.

Datastore is unavailable or lacks capacity

The datastore may not be mounted on the selected host or on all hosts in the cluster. It may also lack enough free space, or fail a storage policy requirement. Confirm datastore visibility from the compute destination, check capacity and storage alarms, and select compatible storage or provide additional capacity.

Customization fails or the source identity remains

Inspect task and event details in vCenter. Verify that VMware Tools is installed, current, and running inside the guest. Confirm that the customization specification matches the guest OS and that the template's guest configuration is supported. Review guest logs for in-guest errors, then correct the specification before redeploying or re-customizing.

VM starts but cannot connect to the network

Verify that the virtual network adapter is connected and attached to the correct port group. Check the guest IP address, gateway, DNS, VLAN reachability, and firewall rules. Also check for duplicate hostnames or IP addresses. Correct the network identity before placing the VM on a production network.

Operational Practices

  • Use approved templates that are patched, documented, tested, and assigned an identifiable version.
  • Review template contents regularly, including virtual hardware, guest settings, tools, software, and security configuration.
  • Use guest customization or an equivalent post-deployment process to prevent duplicate hostnames, IP addresses, machine identities, and domain computer accounts.
  • Use least-privilege permissions and approved inventory folders, clusters, resource pools, datastores, and networks.
  • Choose shared, compatible storage when mobility, vMotion, backup, or cluster services are required.
  • Record deployment decisions so the VM can be supported and audited later.
  • Do not assume that a successful vCenter task means the application is ready. Validate the guest, network, services, monitoring, backup, and security requirements.

Quick Deployment Procedure

  1. Open vCenter and locate VM Templates.
  2. Select and verify the source template.
  3. Start Deploy from Template.
  4. Enter a unique VM name and choose the datacenter and VM folder.
  5. Select the target host, cluster, or resource pool.
  6. Select a datastore or storage policy with sufficient capacity and access.
  7. Review clone, hardware, disk, network, and power options.
  8. Enable guest customization and select a matching specification when required.
  9. Review the complete summary and submit the task.
  10. Monitor Recent Tasks, events, and alarms.
  11. Verify inventory, compute, storage, network, Tools, guest identity, and application readiness.

For a related walkthrough, see Deploy VM From Template.