HomeVirtualizationVMwareHow to export a Virtual Machine using the VMware OVF Tool

How to export a Virtual Machine using the VMware OVF Tool

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:

- Advertisement -
  • 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

  1. Access the following link: https://www.vmware.com/support/developer/ovf/

You will need to log in to VMware using your “My VMware” credentials.

  1. Select Last Releases and click on OVF Tool.
mulcas.com-VMware-OVF-Tool
  1. Select the latest or desired release. In this case, I am selecting the 4.3.0, no reason. Then, select the version.
mulcas.com-VMware-OVF-Tool
  1. Download the tool base on your operating system. Pretty sure is an x64 one.
mulcas.com-VMware-OVF-Tool
  1. Accept to Download.
mulcas.com-VMware-OVF-Tool
  1. Go to the downloaded file, and then install it.
mulcas.com-VMware-OVF-Tool
  1. The following steps are straightforward, just click Next.
mulcas.com-VMware-OVF-Tool
  1. 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.

- Advertisement -
  1. Make sure you have access from your local machine (target) to the ESXi host (source) allocating the VM to be exported.
  2. Power off the VM. In your ESXi host, make sure the VM is powered off.
mulcas.com-VMware-OVF-Tool
  1. 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:\”.

mulcas.com VMware OVF tool export 08
  1. Then, input the ESXi host credentials (username and password) and wait until the VM is exported.
  2. The OVF files will be exported to the selected folder (target).
mulcas.com-VMware-OVF-Tool

Reference:

https://www.vmware.com/support/developer/ovf/

https://code.vmware.com/docs/11747/ovf-tool-user-s-guide

Juan Mulford
Juan Mulford
I have been active in IT for over fourteen years now. I am a solutions architect, working with storage, virtualization, and VDI solutions. For the past ten years, I have been living and working in Taiwan.

9 COMMENTS

    • Not being able to understand a command line tool = Shit4Brains.
      The installer doesn’t have a GUI, it’s a zip file.

      And guess what? Because it’s a command line tool, you can script it. Like auto-deploying test VMs from an ansible playbook. Maybe time to up your game?

  1. VMWare removed the tool it looks like. And their shit doesn’t work. When right click on VM and select EXPORT or EXPORT with image, nothing happens. Tried in all browser and same result. Tried with 3 VMs and same result. Tried Windows Server VM and it fails half way after exporting about 9 – 10GB. VMWare is buggy all the way through. Hopeless, wish there is better option out there.

  2. Downloaded new tool and run it same as per the instructions. It gives error "The operation is not supported on the object.", Fault cause: vmod1.fault.NotSupported"

    Basically VMWare ESXi is shy and not letting me know this simple trouble it had and handled my export request silently. Which is typical of VMware. Bugs every corner and every inch movement through their any of the products. Total mess. Anyway, looks like the Template to VM converted VMs are not exportable as OVF. What a joke. Sad one though.

  3. I have a lab setup and the vCenter VM seems to have encountered an issue and I am trying to export all the VM off the host using the ovftool to my windows local storage.

    However, I seem to be having issues finding the location of some of the VM’s that were controlled by the vCenter and the path is ha-datacenter/datastore1 and datastore2.

    Tried various switches combinations but keep getting the below Location errors:

    PS C:\windows\System32\drivers\etc> ovftool.exe vi://root:[email protected]/Resources/vmfs/volumes/60e89697-ecef5be4-2dfa-1402ec491fe0/uag01 “C:\VM\uag01.ovf”
    Opening VI source: vi://[email protected]:443/Resources/vmfs/volumes/60e89697-ecef5be4-2dfa-1402ec491fe0/uag01
    Error: Locator does not refer to an object: vi://[email protected]:443ha-datacenter/host/host1.ctxlab.local/Resources/Resources/vmfs/volumes/60e89697-ecef5be4-2dfa-1402ec491fe0/uag01
    Completed with errors

    Any light you can shed will be greatly appreciated.

Leave a Reply

- Advertisement -

Popular Articles

mulcas.com-Raspberry-Pi

Raspberry Pi OS in a Virtual Machine with VMware

4
Although the Raspberry Pi OS is designed and optimized for the Raspberry Pi module, it is possible to test and use it without its hardware, with VMware. This solution can be useful if you are a developer (or just a curious guy) and don't have a Raspberry Pi module with you
Unable to delete inaccessible datastore

Unable to delete an "inaccessible" datastore

7
I was switching my storage array, so I migrated the VMs from that old datastore/storage to a new datastore/storage. The old datastore was shared by 3 ESXi hosts, no cluster. After migrating the VMs and unmount/delete the datastore, it was still presented in two of the ESXi hosts and was marked as inaccessible.
This is not a valid source path / URL

This is not a valid source path / URL - SourceTree and Gitlab

0
I have been working on a project with a friend who set up a repository in Gitlab but even though I was able to view all projects on it, I couldn’t really join the repository. I was using SourceTree and Gitlab.
Couldn't load private key - Putty key format too new

Couldn't load private key - Putty key format too new

5
couldn't load private key - Putty key format too new.” This issue happens when you use PuTTygen to generate or convert to a ppk key. Here is how to fix it. 
WinSCP VCSA

Unable to Access the VCSA 6.7 via WinSCP

9
One of the many and easiest ways to get the logs from the ESXi hosts and vCenter Server Appliance (VCSA), is accessing directly to the files directory using tools such as WinSCP, which helps to transfer the files between a local and a remote computer ( Ex. VCSA). I never have had issues with the ESXi hosts and WinSCP, however, trying to access the VCSA is a different story.
- Advertisement -

Recent Comments