vSphere Upgrade Saga: OVFTool to the Rescue

Once I upgraded to vSphere 6.5A, I was no longer able to upload OVF or OVA files through vCenter using either of the web clients. It complains in both cases that I am not running vCenter 6.5. This is a known bug. For more information, see KB 2148007. However, there is a solution: use ovftool.

I found ovftool cumbersome, requiring me to run it multiple times in order to figure out each of the options needed to make import work. So, I wrote a script to work around those issues. This script uses a simple key-value database to house the options I need to set on a per-OVF or OVA basis. Actually, it is more about the product within the OVF or OVA. ov-import.sh simplifies the deployment of OVF or OVAs.

You can find the script in my AAC Library GitHub repository under ovfimport. Please read the README there carefully, as it goes into details on usage. The script does all the heavy lifting, from discovering properties you can set using its –dryrun or –precheck options, to the actual import of the OVA and OVF with your options set in the .ov-defaults file. This is a powerful addition to vSphere Management Assistant or any other Linux-based helper VM. Here is how I use it:

  1. Create a directory containing all the OVAs and zip files of OVFs
  2. Run ov-import.sh –dryrun
  3. Review the output and resultant *.a.txt files for missed properties (the options)
  4. Update the $HOME/.ov-defaults file (a seed file is in the GitHub repository)
  5. Rerun without the –dryrun option and import the OVA and OVFs

For some, there are special cases required, such as the vCenter Server Appliance and for vRealize Network Insight. You can also import those items using this script. Currently, the script successfully imported the following:

- VMware Virtual SAN Witness Appliance
- VMware vSphere Web Client (h5ngcVA)
- VMware vSphere Management Assistant (VMA) 
- VMware vSphere Data Protection (VDP)
- VMware vRealize Orchestrator (VROVA)
- VMware vRealize Appliance (VRA)
- VMware vRealize Business for Cloud (VRBC)
- VMware vRealize Infrastructure Navigator (VIN)
- VMware vRealize Log Insight (VRLI)
- VMware vRealize Operations Manager (VROPS)
- VMware NSX Manager (NSXV)
- VMware Integrated Containers/Harbor (VIC)
- VMware vRealize Network Insight (VRNI)
- VMware Cloud/App  Volumes
- VMware vSphere Replication Server (VR)
- VMware Big Data Extensions (BDE)
- VMware vCenter Server Appliance (VCSA)
- HPE OneView for vCenter (OV4VC)
- William Lam's Nested ESXi Appliance
- DoubleCloud VSearch 
- IxiaDeveloper 
- Runecast Analyzer
- Unitrends Enterprise Backup
- Turbonomic formerly VMTurbo Ops Manager
- Solarwinds Virtualization Manager

Each import has had its own challenges, such as the following:

  • vRNI requires the proxy import to wait until the platform key is available, so the tool will wait until you are ready to provide it when the vRNI platform computes the key.
  • OV4VC uses nonstandard naming conventions for properties, which impacted the parsing quite a bit.
  • vCSA requires you to point the tool toward the ISO image for vCSA not run within the directory. It will mount the image, extract the vCSA OVF, and perform the import.
  • Nested ESXi uses hidden OVF properties, which need to be set for import.

All these items were accounted for with the script. As you discover more issues, let me know! As I discover more, I will update the GitHub README.

You can find the script in my AAC Library GitHub repository under ovfimport. Please read the README there carefully, as it goes into details on usage and how to set up the defaults in the configuration file required.

Note: This tool originally started out by using govc to do imports. Unfortunately, I found that govc could not handle vApps (such as with BDE) and many other OVAs and OVFs. This is why I switched to just using ovftool. The govc code still exists and is in the repository. I would not use it to import OVFs and OVAs until major updates are made.

Update: As of VMware vCenter 6.5b, Deploy OVF is now working.

Edward Haletky

Edward L. Haletky, aka Texiwill, is an author, analyst, developer, technologist, and business owner. Edward owns AstroArch Consulting, Inc., providing virtualization, security, network consulting and development and TVP Strategy where he is also an Analyst. Edward is the Moderator and Host of the Virtualization Security Podcast as well as a guru and moderator for the VMware Communities Forums, providing answers to security and configuration questions. Edward is working on new books on Virtualization.

Leave a Reply

Your email address will not be published. Required fields are marked *

nineteen + 11 =