For those of you who have tried to import an OVA directly into vCloud Director have probably noticed that this is not supported and only an OVF file can be uploaded. However, it is possible to upload an OVA directly into vCloud Director, but it does require the use of another tool called the ovftool which is multi-platform command-line utility for OVF/OVA management. This article was motivated by a recent internal discussion and I thought I share this little tidbit in case it was not very well known.
Before jumping into the solution, I would like to provide some background on what an OVF and OVA is. An OVF (Open Virtualization Format) is an open, secure, portable, efficient, and flexible format for the packaging and distribution of one or more virtual machines. An OVF usually contains several files that includes a descriptor file with .ovf extension, virtual disk file(s) with .vmdk extension and manifest file with .mf extension. The OVF format is a DMTF standard and it is also supported on other platforms besides VMware that provides support for the OVF format. Contrast that to an OVA (Open Virtual Appliance) which is just a single tar archive file that contains the contents of an OVF. An OVA can be thought of like a container which compresses the contents of the OVF for ease of distribution. Given this difference, I suspect this might be the reason why only the OVF format is only supported in vCloud Director. Though I can see why it maybe confusing when vSphere supports both the OVF and OVA format.
Note: vCloud Director supports both 1.0 and 1.1 of the OVF format.
Going back to our initial problem, you can use the ovftool to deploy an OVA directly to vCloud Director. The way this works is that the OVF is extracted out as part of the upload process from the OVA (not additional space required on the client side) prior to uploading to vCloud Director. This removes the manual two step process today which is to convert or extract the OVF from the OVA and then upload to vCloud Director.
The syntax for the ovftool to import to vCloud Director is as follows:
ovftool [OVA-FILE] [VCLOUD-LOCATOR]
Note: You can find examples of the vCloud locator syntax in the ovftool documentation.
Here is an example of uploading the recent vCO 5.1u1 OVA to a vCloud Director 5.1 environment using the ovftool on Mac OS X:
"/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool/ovftool" --acceptAllEulas /Users/lamw/Desktop/vCO_VA-220.127.116.11-1070383_OVF10.ova "vcloud://username:password@vcloud-director-ip-or-hostname:443?org=TechMarketing&vappTemplate=vCO-5.1u1&catalog=WorkInProgress&vdc=TM-Allocation1-ovDC"
Here is a screenshot of the upload:
The result of the above command is a new vAppTemplate called vCO-5.1u1 in the Catalog as well as a deployed vApp in my workspace. You can also opt out of deploying the vApp to the workspace by specifying –vCloudTemplate to be true.
If we login to our vCloud Director instance, we can see that our vAppTemplate has been deployed:
The nice thing about this solution is you can keep all of your OVA files for ease of distribution without having to convert them to an OVF. If you wish to convert your OVA files to OVF, you do not need to deploy to a vSphere environment first and then export it back out to an OVF, you can just use the ovftool to help with the conversion.
The syntax to convert an OVA to OVF is as follows:
ovftool [OVA-FILE] [OVF-FILE]
Here is an example of converting our vCO OVA to an OVF:
"/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool/ovftool" --acceptAllEulas /Users/lamw/Desktop/vCO_VA-18.104.22.168-1070383_OVF10.ova /Users/lamw/Desktop/vCO-5.1u1.ovf
Here is a screenshot of the conversion process:
Get notification of new blog postings and more by following lamw on Twitter: @lamw