Templates are primary copies of virtual machines that let you create ready-for-use virtual machines. You can change the template, for example, by installing additional software in the guest operating system, while preserving the state of the primary template.

Prerequisites

Verify that you have the following privileges:
  • Virtual machine.Provisioning.Clone template on the source template.
  • Virtual machine.Edit inventory.Create from existing on the folder where the template is created.
  • Datastore.Allocate space on all datastores where the template is created.

Procedure

  1. Start the Clone Template to 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 and select New Virtual Machine.
    2. Select Clone template to template and click Next.
    3. On the Select a template to clone page, browse to the template that you want to clone or accept the default one.
    From a template

    Right-click a template and select Clone to Template.

  2. On the Select a name and folder page, enter a unique name for the template and select the data center or folder in which to deploy it.
    The template name determines the name of the files and folder on the disk. For example, if you name the template win10tmp, the template files are named win10tmp.vmdk, win10tmp.nvram, and so on. If you change the template name, the names of the files on the datastore do not change.

    Folders provide a way to store virtual machines and templates for different groups in an organization and you can set permissions on them. If you prefer a flatter hierarchy, you can put all virtual machines and templates in a data center and organize them in a different way.

  3. Click Next.
  4. On the Select a compute resource page, select a host or cluster resource for the template.
    The Compatibility pane shows the result from the compatibility checks.
    Note: The template must be registered with an ESXi host. The host handles all requests for the template and must be running when you create a virtual machine from the template.
    Important:

    If the template that you clone 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 clone 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 template use the storage policy and datastore selected for the configuration files of the source template.

  5. 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.
    Option Description
    Clone a virtual machine 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 are stored on a standard datastore.

      If you select the PMem mode, all virtual disks are 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 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 issues. You can also convert a standard hard disk to a PMem hard disk.
    Clone a virtual machine 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 expand to its 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 issues. You can also convert a standard hard disk to a PMem hard disk.
    Important: If you clone an encrypted virtual machine, you cannot change the storage policy. For information about cloning an encrypted virtual machine, see vSphere Security.
  6. Click Next.
  7. On the Ready to complete page, review the template settings and click Finish.

Results

The progress of the clone task appears in the Recent Tasks pane. When the task completes, the template appears in the inventory.