You can export virtual machines, virtual appliances, and vApps in Open Virtual Format (OVF) and Open Virtual Appliance (OVA). You can then deploy the OVF or OVA template in the same environment or in a different environment.

Note: In vSphere 6.5 and later, you cannot export OVA templates, OVF templates is the only option.

Alternatively, you can use the VMware OVF Tool to deploy and export OVF templates.

In previous versions of vSphere, you needed to install the Client Integration Plug-in to deploy and export OVF or OVA templates. vSphere 6.5 no longer requires that you install the Client Integration Plug-in to export OVF templates or to deploy OVF and OVA templates.

OVF and OVA File Formats and Templates

OVF is an open standard which contains multiple files as a package. For example, .ovf, .vmdk, .nvram, and so on. OVF supports exchange of virtual appliances across products and platforms. OVA is a single-file distribution of the OVF file package. When you export a virtual machine as an OVF file, you download an OVF file and the virtual disk files.

The OVF and OVA formats offer the following advantages:

  • OVF and OVA files are compressed, allowing for faster downloads.
  • The vSphere Client validates an OVF or OVA file before importing it, and ensures that it is compatible with the intended destination server. If the appliance is incompatible with the selected host, it cannot be imported and an error message appears.
  • OVF and OVA can encapsulate multi-tiered applications and more than one virtual machine.

Exporting OVF templates allows you to create virtual appliances that other users can import later. You can use the export function to distribute pre-installed software as a virtual appliance, or to distributing template virtual machines to users. You can make the OVF or OVA file available to users who cannot access your vCenter Server inventory.

Deploying an OVF or OVA template allows you to add pre-configured virtual machines or vApps to your vCenter Server or ESXi inventory. Deploying an OVF or OVA template is similar to deploying a virtual machine from a template. However, you can deploy an OVF or OVA template from any local file system accessible from the vSphere Web Client, or from a remote Web server. The local file systems can include local disks (such as C:), removable media (such as CDs or USB keychain drives), and shared network drives.

Deploy an OVF or OVA Template

You can deploy an OVF or OVA template from a local file system or from a URL.

Some of the pages in the Deploy OVF Template wizard only appear if the OVF template that you deploy requires additional customization, contains deployment options or has one or multiple vService dependencies.

  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 Deploy OVF Template.

    The Deploy OVF Template wizard opens.

  2. On the Select an OVF template page, specify the location of the source OVF or OVA template and click Next.
    Option Action
    URL Type a URL to an OVF or OVA template located on the Internet. Supported URL sources are HTTP and HTTPS.
    Note: Verify that all files from the OVF package are at the same location of the OVF descriptor file.

    Example: http://vmware.com/VMTN/appliance.ovf.

    Local file Click Browse and select all the files associated with an OVF template or OVA file. This includes files such as .ovf, .vmdk, etc. If you do not select all the required files, a warning message displays.
  3. On the Select a name and folder page, enter a unique name for the virtual machine or vApp, select a deployment location, and click Next.

    The default name for the virtual machine is the same as the name of the selected OVF or OVA template. If you change the default name, choose a name that is unique within each vCenter Server virtual machine folder.

    The default deployment location for the virtual machine is the inventory object where you started the wizard.

  4. On the Select a compute resource page, select a resource where to run the deployed VM template,.
    1. (Optional) To automatically power on the virtual machine that you deploy on the host, select the Automatically power on deployed VM check box.
    2. Click Next.
  5. On the Review details page, verify the OVF or OVA template details and click Next.
    Option Description
    Publisher Publisher of the OVF or OVA template, if a certificate included in the OVF or OVA template file specifies a publisher.
    Download size Size of the OVF or OVA file.
    Size on disk Size on disk after you deploy the OVF or OVA template.
  6. (Optional) On the Configuration page, select a deployment configuration and click Next.
  7. On the Select storage page, define where and how to store the files for the deployed OVF or OVA template.
    1. Select the disk format for the virtual machine virtual disks.
      Format Description
      Thick Provision Lazy Zeroed 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 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 file format (-flat.vmdk), 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.
      Thin Provision Use this format to save storage space. For the thin disk, you provision as much datastore space as the disk requires based on the value that you enter for the disk size. However, the thin disk starts small and at first, uses only as much datastore space as the disk needs for its initial operations.
    2. Select a VM Storage Policy.

      This option is available only if storage policies are enabled on the destination resource.

    3. (Optional) Enable the Show datastores from Storage DRS clusters check box to choose individual datastores from Storage DRS clusters for the initial placement of the virtual machine.
    4. Select a datastore to store the deployed OVF or OVA template.

      The configuration file and virtual disk files are stored on the datastore. Select a datastore large enough to accommodate the virtual machine or vApp and all associated virtual disk files.

      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/kb/52370.
  8. On the Select networks page, select a source network and map it to a destination network. Click Next.

    The Source Network column lists all networks that are defined in the OVF or OVA template.

  9. (Optional) On the Customize template page, customize the deployment properties of the OVF template and click Next.
  10. (Optional) On the vService bindings page, select a binding service provider and click Next.
  11. (Optional) On the Ready to complete page, review the page and click Finish.

As a result, a new task for creating the virtual machine appears in the Recent Task pane. After the task is complete, the new virtual machine is created on the selected resource.

Export an OVF Template

An OVF template captures the state of a virtual machine or vApp into a self-contained package. The disk files are stored in a compressed, sparse format.

Note: You cannot export encrypted virtual machines.

Prerequisites

  • Power off the virtual machine or vApp.
  • Required privilege:vApp.Export

Procedure

  1. Navigate to a virtual machine or vApp and from the Actions menu, select Template > Export OVF Template.
  2. In the Name folder, enter the name of the template.
    Example: For example, enter MyVm.
    Note: When you export an OVF template with a name that contains asterisk (*) characters, those characters turn into underscore (_) characters.
  3. (Optional) In the Annotation field, enter a description.
  4. Select the Enable advanced options check box if you want to include additional information or configurations in the exported template.

    The advanced settings include information about the BIOS UUID, MAC, boot order, PCI Slot numbers, and configuration settings used by other applications. These options limit portability.

  5. To save each file associated with the template (.ovf, .vmdk, .mf), click OK and respond to the prompts.

Export an OVF Template with a vTPM Placeholder

With vSphere 8.0, you can manually export an OVF template of a virtual machine that contains a vTPM device. Because vTPMs are security devices with unique identities, a vTPM placeholder is added to the OVF template instead of a vTPM device and replaced with a new vTPM device upon instantiation. To deploy or export an OVF template of a virtual machine with a vTPM device, you can use the VMware OVF Tool. For more information about the VMware OVF Tool, see OVF Tool User's Guide.

Prerequisites

  • Power off the virtual machine.
  • Deactivate any applications in the guest operating system of the virtual machine that use the vTPM device, such as BitLocker.
  • Verify that you have the required privilege: Cryptographic operations.Decrypt.

Procedure

  1. Remove the vTPM device from the virtual machine.
    1. Navigate to the virtual machine and click Actions.
    2. Click Edit Settings.
    3. On the Virtual Hardware tab, locate the Trusted Platform Module entry.
    4. Move your pointer over the device and click the Remove icon.

      This icon appears only for the virtual hardware that you can safely remove.

    5. Click Delete to confirm you want to remove the device.

      The vTPM device is marked for removal.

    6. Click OK.

      Verify that the Virtual Trusted Platform Module entry no longer appears in the virtual machine Summary tab in the VM Hardware pane.

  2. Decrypt the virtual machine if it is encrypted.

    For more information on how to decrypt a virtual machine, see Decrypt an Encrypted Virtual Machine or Virtual Disk.

  3. Export the virtual machine to an OVF template.
  4. Open the OVF (.ovf) descriptor file and manually add the vTPM device placeholder:
    <Item ovf:required="false">
     <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
     <rasd:ElementName>Virtual TPM</rasd:ElementName>
     <rasd:InstanceID>13</rasd:InstanceID>
     <rasd:ResourceSubType>vmware.vtpm</rasd:ResourceSubType>
     <rasd:ResourceType>1</rasd:ResourceType>
    </Item>
    Note: The OVF descriptor contains a placeholder for a vTPM device which does not have any secrets. The virtual machine encryption keys are generated when you deploy a virtual machine from this OVF template.
  5. Open the OVF manifest file (.mf) and change the SHA-256 checksum for the .ovf file.
  6. (Optional) Resign the .ovf file.
  7. Deploy the manually exported OVF template.

Export an OVF Template of a Virtual Machine without a vTPM Placeholder

To deploy an OVF template of a virtual machine with a vTPM device, you can use the VMware OVF Tool. For more information about the VMware OVF Tool, see OVF Tool User's Guide.

Prerequisites

  • Power off the virtual machine.
  • Deactivate any applications in the guest operating system of the virtual machine that use the vTPM device, such as BitLocker.

Procedure

  1. Remove the vTPM device from the virtual machine.
    1. Navigate to the virtual machine and click Actions.
    2. Click Edit Settings.
    3. On the Virtual Hardware tab, locate the Trusted Platform Module entry.
    4. Move your pointer over the device and click the Remove icon.

      This icon appears only for the virtual hardware that you can safely remove.

    5. Click Delete to confirm you want to remove the device.

      The vTPM device is marked for removal.

    6. Click OK.

      Verify that the Virtual Trusted Platform Module entry no longer appears in the virtual machine Summary tab in the VM Hardware pane.

  2. Decrypt the virtual machine if it is encrypted.

    For more information on how to decrypt a virtual machine, see Decrypt an Encrypted Virtual Machine or Virtual Disk.

  3. Export the virtual machine to an OVF template.
  4. Deploy the manually exported OVF template and add a vTPM device to the virtual machine.

    For more information on how to add a vTPM device to a virtual machine, see Add Virtual Trusted Platform Module to an Existing Virtual Machine.