Deploying a virtual machine from a template creates a virtual machine that is a copy of the template. The new virtual machine has the virtual hardware, installed software, and other properties that are configured for the template.

Prerequisites

You must have the following privileges to deploy a virtual machine from a template:

  • Virtual machine.Inventory.Create from existing on the data center or virtual machine folder.
  • Virtual machine.Configuration.Add new disk on the data center or virtual machine folder. Required only if you customize the original hardware by adding a new virtual disk.
  • Virtual machine.Provisioning.Deploy template on the source template.
  • Resource.Assign virtual machine to resource pool on the destination host, cluster, or resource pool.
  • Datastore.Allocate space on the destination datastore.
  • Network.Assign network on the network to which the virtual machine is assigned. Required only if you customize the original hardware by adding a new network card.
  • Virtual machine.Provisioning.Customize on the template or template folder if you are customizing the guest operating system.
  • Virtual machine.Provisioning.Read customization specifications on the root vCenter Server if you are customizing the guest operating system.

Procedure

  1. Start the Deploy From Template wizard.
    Option Description
    From a valid parent object of a virtual machine
    1. Right-click any inventory object that is a valid parent object of a virtual machine, such as a data center, folder, cluster, resource pool, or host, and select New Virtual Machine.
    2. On the Select a creation type page, select Deploy from template and click Next.
    3. On the Select a template page, select the template that you want to use.
    From a template

    Right-click a template and select New VM from This Template.

  2. On the Select a name and folder page, enter a unique name for the virtual machine and select a deployment location.
  3. On the Select a compute resource page, select the host, cluster, resource pool, or vApp where the virtual machine will run and click Next.
    The virtual machine will have access to the resources of the selected object.
    Important:

    If the template that you deploy has an has an NVDIMM device and virtual PMem hard disks, the destination host or cluster must have available PMem resource. Otherwise, you cannot proceed with the task.

    If the template that you deploy does not have an NVDIMM device, but it has virtual PMem hard disks, the destination host or cluster must have available PMem resource. Otherwise, all the hard disks of the virtual machine will use the storage policy and datastore selected for the configuration files of the source template.

    If creating the virtual machine at the selected location causes compatibility problems, an alarm appears in the Compatibility pane.

  4. On the Select storage page, select the datastore or datastore cluster in which to store the virtual machine configuration files and all of the virtual disks. Click Next.
    Option Description
    Deploy a virtual machine from a template that has vPMem hard disks
    1. Choose the type of storage for the template by selecting the Standard, the PMem, or the Hybrid radio button.

      If you select the Standard mode, all virtual disks will be stored on a standard datastore.

      If you select the PMem mode, all virtual disks will be stored on the host-local PMem datastore. Configuration files cannot be stored on a PMem datastore and you must additionally select a regular datastore for the configuration files of the virtual machine.

      If you select the Hybrid mode, all PMem virtual disks will remain stored on a PMem datastore. Non-PMem disks are affected by your choice of a VM storage policy and datastore or datastore cluster.

      For more information about persistent memory and PMem storage, see the vSphere Resource Management guide.

    2. (Optional) From the Select virtual disk format drop-down menu, select a new virtual disk format for the template or keep the same format as the source virtual machine.
    3. (Optional) From the VM Storage Policy drop-down menu, select a virtual machine storage policy or leave the default one.
    4. Select a datastore or a datastore cluster.
    5. Select the Disable Storage DRS for this virtual machine check box if you do not want to use storage DRS with the virtual machine.
    6. (Optional) Turn on the Configure per disk option to select a separate datastore or a datastore cluster for the template configuration file and for each virtual disk.
      Note: You can use the Configure per disk option to convert a PMem hard disk to a regular one, but that change might cause performance problems. You can also convert a standard hard disk to a PMem hard disk.
    Deploy a virtual machine from a template that does not have vPMem hard disks
    1. Select the disk format for the virtual machine virtual disks.

      Same format as source uses the same disk format as the source virtual machine.

      The Thick Provision Lazy Zeroed format creates a virtual disk in a default thick format. Space required for the virtual disk is allocated when the virtual disk is created. Data remaining on the physical device is not erased during creation, but is zeroed out later, on demand, on first write from the virtual machine.

      Thick Provision Eager Zeroed is a type of thick virtual disk that supports clustering features such as Fault tolerance. Space required for the virtual disk is allocated at creation time. In contrast to the flat format, the data remaining on the physical device is zeroed out when the virtual disk is created. It might take much longer to create disks in this format than to create other types o disks.

      The Thin Provision format saves storage space. At first, a thin provisioned disk uses only as much datastore space as the disk initially needs. If the thin disk needs more space later, it can grow to the maximum capacity allocated to it.

    2. (Optional) Select a VM storage policy or leave the default one.
    3. Select a datastore or a datastore cluster.
    4. (Optional) Turn on the Configure per disk option to select a separate datastore or a datastore cluster for the template configuration file and for each virtual disk.
      Note: You can use the Configure per disk option to convert a PMem hard disk to a regular one, but that change might cause performance problems. You can also convert a standard hard disk to a PMem hard disk.
  5. On the Select clone options, select additional customization options for the new virtual machine.
    You can choose to customize the guest operating system or the virtual machine hardware. You can also choose to power on the virtual machine after its creation.
  6. (Optional) On the Customize guest OS page, apply a customization specification to the virtual machine.
    Customizing the guest OS prevents from conflicts that might occur if you deploy virtual machines with identical settings, such as duplicate computer names.
    Note: To access customization options for Windows guest operating systems, Microsoft Sysprep tools must be installed on the vCenter Server system. The Sysprep Tool is built into the Windows Vista and Windows 2008 and later operating systems. For details about this and other customization requirements, see Guest Operating System Customization Requirements.
    Option Description
    Select an existing specification Select a customization specification from the list.
    Create a specification Click the Create a new specification icon, and complete the steps in the wizard.
    Create a specification from an existing specification
    1. Select a customization specification from the list.
    2. Click the Create a spec from an existing spec icon, and complete the steps in the wizard.
  7. (Optional) On the Customize hardware page, configure the virtual machine hardware and options and click Next.
    You can leave the defaults and configure the virtual machine hardware and options later. For more information, see Configuring Virtual Machine Hardware and Configuring Virtual Machine Options.
    Important: If you chose to use PMem storage for the virtual machine, its default hard disk, the new hard disks that you configure, and the NVDIMM devices that you add to the virtual machine all share the same PMem resources. So, you must adjust the size of the newly added devices in accordance with the amount of the PMem available to the host. If any part of the configuration requires attention, the wizard alerts you.
  8. On the Ready to complete page, review the information and click Finish.