In the vSphere Client, you can use a content library item of the VM Template type to deploy a virtual machine to a host or cluster in your vSphere environment.

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

For information how to configure the virtual machine hardware options, see Configuring Virtual Machine Hardware and Configuring Virtual Machine Options

Note: If you want to use the API calls to deploy an OVF template that contains vPMem hard disks and that has been exported from a content library, consult https://kb.vmware.com/s/article/52370.

Prerequisites

Verify that you have the following privileges:
  • Virtual machine.Inventory.Create from existing
  • Virtual machine.Configuration.Add new disk
  • Virtual machine.Provisioning.Deploy template
  • Virtual machine.Assign virtual machine to resource pool
  • vApp.Import
  • vApp.Create
  • 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.
Important: If the template that you deploy has an NVDIMM device and virtual PMem disks, the destination host or cluster must have an available PMem resourse. Otherwise, you cannot proceed with the task.

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

Procedure

  1. Navigate to Menu > Content Libraries.
  2. To open a content library, click its name.
  3. On the Templates tab, right-click a VM Template and select New VM from This Template.
    The Deploy From VM Template wizard opens.
  4. On the Select a name and folder page, enter a name and select a location for the virtual machine.
  5. On the Select a compute resource page, select a host, a cluster, a resource pool, or a vApp where to run the deployed VM template, and click Next.
  6. On the Select storage page, select the datastore or datastore cluster in which to store the virtual machine configuration files and all virtual disks.
    Option Action
    Deploy a virtual machine from a template that has vPMem hard disks
    1. Select the type of storage for the template by clicking 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. Your choice of a VM storage policy and datastore or datastore cluster affects the Non-PMem disks.
    2. (Optional) From the VM Storage Policy drop-down menu, select a virtual machine storage policy or leave the default one.
    3. Select a datastore or a datastore cluster.
    4. Select the Disable Storage DRS for this virtual machine check box if you do not want to use storage DRS with the virtual machine.
    5. (Optional) To select a separate datastore or a datastore cluster for the template configuration file and for each virtual disk, enable the Configure per disk option.
      Note: To convert a PMem hard disk to a regular one, you can use the Configure per disk option , 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.
      • The Same format as source option 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. The 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, or on first write from the virtual machine.
      • The Thick Provision Eager Zeroed format is a type of thick virtual disk that supports clustering features such as Fault Tolerance. The 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 of 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 extend 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) Enable 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.
  7. Click Next.
  8. On the Select deploy options page, apply a customization specification to the virtual machine and click Next.
    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.
    Option Action
    Select an existing specification Select a customization specification from the list.
    Override To change the guest customization specification for this deployment only, click Override, complete the steps in the Override VM Customization Specification wizard, and click OK.
  9. (Optional) On the Customize guest OS page, select a customization specification to apply to the virtual machine.
    Customizing the guest operating system helps prevent conflicts that can result if you or other users deploy virtual machines with identical settings, such as duplicate computer names.
  10. (Optional) On the User settings page, specify the required settings for the virtual machine.
    This page of the wizard appears only if the selected specification requires additional customization.
  11. (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.
    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. 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.
  12. On the Ready to complete page, review the information and click Finish.

Results

A new task for creating the virtual machine appears in the Recent Tasks pane. After the task finishes, the new virtual machine is created on the selected resource.