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.
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.
- 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.
- 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. - 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.
- On the Select a compute resource page, select a resource where to run the deployed VM template,.
- (Optional) To automatically power on the virtual machine that you deploy on the host, select the Automatically power on deployed VM check box.
- Click Next.
- 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. - (Optional) On the Configuration page, select a deployment configuration and click Next.
- On the Select storage page, define where and how to store the files for the deployed OVF or OVA template.
- 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. - Select a VM Storage Policy.
This option is available only if storage policies are enabled on the destination resource.
- (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.
- 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.
- Select the disk format for the virtual machine virtual disks.
- 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.
- (Optional) On the Customize template page, customize the deployment properties of the OVF template and click Next.
- (Optional) On the vService bindings page, select a binding service provider and click Next.
- (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.
Prerequisites
- Power off the virtual machine or vApp.
- Required privilege:
Procedure
- Navigate to a virtual machine or vApp and from the Actions menu, select .
- 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.
- (Optional) In the Annotation field, enter a description.
- 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.
- 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: .
Procedure
- Remove the vTPM device from the virtual machine.
- Navigate to the virtual machine and click Actions.
- Click Edit Settings.
- On the Virtual Hardware tab, locate the Trusted Platform Module entry.
- Move your pointer over the device and click the Remove icon.
This icon appears only for the virtual hardware that you can safely remove.
- Click Delete to confirm you want to remove the device.
The vTPM device is marked for removal.
- Click OK.
Verify that the Virtual Trusted Platform Module entry no longer appears in the virtual machine Summary tab in the VM Hardware pane.
- 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.
- Export the virtual machine to an OVF template.
- 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. - Open the OVF manifest file (.mf) and change the SHA-256 checksum for the .ovf file.
- (Optional) Resign the .ovf file.
- 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
- Remove the vTPM device from the virtual machine.
- Navigate to the virtual machine and click Actions.
- Click Edit Settings.
- On the Virtual Hardware tab, locate the Trusted Platform Module entry.
- Move your pointer over the device and click the Remove icon.
This icon appears only for the virtual hardware that you can safely remove.
- Click Delete to confirm you want to remove the device.
The vTPM device is marked for removal.
- Click OK.
Verify that the Virtual Trusted Platform Module entry no longer appears in the virtual machine Summary tab in the VM Hardware pane.
- 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.
- Export the virtual machine to an OVF template.
- 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.