Export an OVA from ESXi vSphere 7 with OVF tool

Introduction

To migrate VMs between platforms it is common to create an OVA. An OVA (open virtualization appliance) is a compressed package that contains a VM disk and its descriptor in OVF (open virtualization format). As of version 6.5, vSphere no longer provides an easy way for users to export OVA files. 

When you connect with the vSphere 7.0 Web Client, a VM has an OVF export option but there is no OVA option. If you would like to directly export a VM as an OVA file, you can use OVF tool on the command line. To export many VMs, you could use the commands in a script. Or if you are working with a large VM, you could export an OVF and then compress it to create the OVA.

Before you export a VM, delete all snapshots and run disk consolidation, and remove any ISO disks that you have mounted on the VM.

 

Before you begin:

  1. Obtain your vCenter URL and credentials

 

Install OVF tool on your local system

To install OVF tool, do these steps:

  1. Go to the VMware website Downloads menu and select OVF tool and download the Windows version, or to use another version (Mac or Linux), go to the main Downloads page and search for ovf tool

  2. Install OVF tool with the installer package or on Linux, open a shell and run the bundle with a shell command, such as sh ovftool.bundle (with the name of your bundle file).

 

Discover your VM

To discover your VM, do these steps:

  1. If you do not know the path to your VM, you can discover it by starting with a general command like this but with the appropriate values for your environment.

    ovftool vi://administrator@vsphere.local:password@nsxqa-vc.example.com
  2. After the command returns an error message, it will suggest objects under this path. Select more suggestions until you get to your vm folder and select a VM, such as:

    vi://administrator@vsphere.local:password@nsxqa-vc.example.com/DcNSX-qa/vm/windowstest

     

To display the VM OVF details, do these steps:

  1. Run the OVF tool with the default vi command for your VM

    ovftool vi://administrator@vsphere.local:password@nsxqa-vc.example.com/DcNSX-qa/vm/windowstest

    Note that it is possible to enter the administrator and password interactively

     

Directly download an OVA file

To download the OVA file:

  1. Enter vi:// with the VM path and with a name for a local file with a .ova suffix at the end.

     

You should now be able to upload the OVA file into a VM template in the cloud platform's Catalogue so users can create VMs from the template and deploy them. 

Export an OVF folder and convert it to an OVA file

An alternative method is to export the OVF package and convert it to an OVA file. This method is recommended by VMware and it may provide better performance for large VMs.

  1. Export the OVF package to your local file system and ensure it is in a separate folder.

  2. Convert it to an OVA file using OVF tool

For example:

Your OVA file is now ready to use.

Troubleshooting

On Linux, remember to escape any special characters in your password that may be interpreted by the shell.

 

References

For more information about the Abiquo cloud platform, visit our website: https://www.abiquo.com.

For more details about OVA and OVF export, see the VMware release notes for vSphere 6.5 (https://docs.vmware.com/en/VMware-vSphere/6.5/rn/vsphere-esxi-vcenter-server-65-release-notes.html) in the section with the title: "vSphere Web Client does not support exporting virtual machines or vApps as OVA templates".

Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved