What
Export a Virtual Machine using the VMware OVF Tool, is a workaround for a previous post “Unable to export OVF template.” I still see a lot of people having issues in exporting a VMware OVF file using the conventional VMware procedure. Usually, the problem with this operation is the web browser in use, but more often than not, the real issue is the network connectivity between the ESXi host and the target client machine. So, first, be sure the connection is fine, otherwise, this workaround won’t work either. I’ll also use this post as a quick introduction to the VMware OVF Tool.
The VMware Tool is implemented by VMware for easily importing and exporting virtual machines in Open Virtualization Format (OVF) standard format. I know it is an old tool, nevertheless, is still very functional and powerful. Here, I want to show you how to download and install it, and then how to use it from a Windows machine. Maybe, I’ll write more about this tool in new blog posts.
If you follow the steps in the below (How) section, you can start exporting your VM in less than 10 min.
What is the VMware OVF Tool
The OVF specification describes a secure, portable, efficient, and flexible method to package and distribute virtual machines and components. It originated from the Distributed Management Task Force (DMTF) after vendor initiative. Companies that contributed to the OVF standard include VMware, Dell, HP, IBM, Microsoft, XenSource, and Citrix.
The VMware OVF Tool provides the following key features:
- Supports import and generation of OVA packages (OVA is part of the OVF standard, and contains all the files of a virtual machine or vApp in a single file.)
- Directly converts between any vSphere, vCloud Director, VMX, or OVF source format to any vSphere, vCloud Director, VMX, or OVF target format.
- Accesses OVF sources using HTTP, HTTPS, FTP, or from a local file.
- Deploys and exports vApp configurations on vSphere 4.0 (and all newer) targets and on vCloud Director 1.5 (and all newer) targets.
- Provides options to power on a VM or vApp after deployment, and to power off a virtual machine or vApp before exporting (caution advised).
- Show information about the content of any source in probe mode.
- Provides context-sensitive error messages for vSphere and vCloud Director sources and targets, showing possible completions for common errors, such as an incomplete vCenter inventory path or missing datastore and network mappings.
- Provides an optional output format to support scripting when another program calls OVF Tool.
- Uses new optimized upload and download API (optimized for vSphere 4.0 and newer).
- Signs OVF packages and validates OVF package signatures.
- Validates XML Schema of OVF 1.0 and OVF 1.1 descriptors.
- Import and export of OVF packages into a vApprun 1.0 workspace.
How
Download and Install the VMware OVF Tool
Downloading and installing the VMware OVF tool to export VMs is a piece of cake, however, it is my style to take nothing for granted.
Update:
The below steps are outdated, VMware has moved the OVF Tool to a different site. I'll update this page or create a new post about this in the future. For now, use the following link to download the OVF Tool. Installing and using the tool is still the same. https://developer.vmware.com/web/tool/4.4.0/ovf
@Local Machine (PC) - Target
- Access the following link: https://www.vmware.com/support/developer/ovf/
You will need to log in to VMware using your “My VMware” credentials.
- Select Last Releases and click on OVF Tool.
- Select the latest or desired release. In this case, I am selecting the 4.3.0, no reason. Then, select the version.
- Download the tool base on your operating system. Pretty sure is an x64 one.
- Accept to Download.
- Go to the downloaded file, and then install it.
- The following steps are straightforward, just click Next.
- The VMware OVF tool command-line utility will be installed into your Windows system.
Export a VM using the OVF tool
Once the VMware OFV tool is installed, it is time to export our VM.
- Make sure you have access from your local machine (target) to the ESXi host (source) allocating the VM to be exported.
- Power off the VM. In your ESXi host, make sure the VM is powered off.
- Run to the Windows command prompt (cmd.exe) as administrator and go to the OVF Tool installed location folder. Default is C:\Program Files\VMware\VMware OVF Tool.
From here, run the following command:
- ovftool.exe <source locator> <target locator>
- ovftool.exe vi://<ESXi-host-ip/vm-name>
- Ex: ovftool.exe vi://192.168.0.160/test-vm H:\
In the above example, I am exporting the VM named “test-vm”, located in the ESXi host “192.168.0.160” to my local machine (PC) drive “H:\”.
- Then, input the ESXi host credentials (username and password) and wait until the VM is exported.
- The OVF files will be exported to the selected folder (target).