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).
Works, thanks
No GUI = Shit Tool. The installer has a better UI then the tool itself? Seriously?
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?
Thanks!
Very Thanks!
thanks dude works a treat, loved @MeganLaw response :0 step up or get left behind in the dung dude
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.
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.
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.