Do you need to deliver your appliances in smaller packages or do you have an OVF and don't know how to use it? This how-to unravels the OVF mystery.
The Open Virtualization Format (OVF) is a virtual machine standard that provides a flexible, secure, portable and efficient way to package and distribute virtual machines. While often referring to virtual appliances, you can package any virtual machine in OVF and distribute it. The OVF file is an XML file that describes a virtual machine and its configuration.
So, whatâ€™s so great about OVF? Since there are so many disparate points of view in the virtualization world, a proposal was made that there should be a way to standardize virtual machine delivery in a hypervisor agnostic fashion. In 2008, the Distributed Management Task Force (DMTF) drafted the OVF Specification V1.0.0. The DMTF is a collective effort by Dell, HP, IBM, Microsoft, VMware and XenSource. Currently, VirtualBox, XenServer and VMware support OVF. This weekâ€™s entry describes the use of VMwareâ€™s OVFTool.
Download and Install
Point your browser to OVF Tool Download and download the tool for your operating system (Windows or Linux). Unzip the tool into any folder or directory. The binary or its supplied libraries neednâ€™t be in your path to work correctly. On Linux, depending on your install, you might have some dependent packages to install before you can use ovfTool. The potential list is too long to provide here for every distribution and possible configuration.
Once you have ovfTool downloaded, unzipped and installed into your path and library locations or just used as is, where is, itâ€™s time to put this thing to work. The ovfTool is a command line application, which means thereâ€™s no cute little graphical application for itâ€”youâ€™ll have to use your Unix ninja skills on this one.
Letâ€™s say that youâ€™ve found and downloaded as an OVF and you need to convert it to a standard VMware ESX-style virtual machine. At the command line (Xterm, Konsole) cd to the directory where ovfTool is (If it isnâ€™t in your path) and execute the ovfTool command with the â€“h (help) switch.
# ./ovftool â€“h
All the syntax information youâ€™ll need for the ovfTool displays for you on the screen. The simplest invocations are to convert an OVF and its corresponding disk file(s) to VMware-usable VMX and VMDK files.
# ./ovftool /downloads/Ubuntu9.04.ovf /VM/Ubuntu9.04/Ubuntu9.04.vmx
Where /downloads is a common download location and /VM is where you store your virtual machines. Youâ€™ll receive the following messages if everything goes according to plan.
Deploying /downloads/Ubuntu9.04.ovf to /VM/Ubuntu9.04/Ubuntu9.04.vmx
Converting disk /downloads/Ubuntu9.04-disk1.vmdk: XX% done.
Deployment completed successfully!
Now open the .vmx file to automatically insert the new virtual machine into inventory. If the virtual machine doesnâ€™t start, set the execute bit on the newly created .vmx file.
If youâ€™re in the habit of creating your own virtual appliances (Specialized virtual machines) for public consumption, you might want to consider converting them to OVF before sharing them. VMDK to OVF conversion is a compression as well as a redefinition of your virtual machine. I downloaded a virtual appliance with a 20GB configured disk that weighed in just shy of 500MBâ€”your mileage may vary for compression that takes place during conversion.
To convert your appliances to OVF, issue the following commands.
# ./ovftool /VM/VAppliance1.01.vmx /OVF/VAppliance.ovf
Exporting /VM/VAppliance1.01.vmx to /OVF/VAppliance.ovf
Converting disk /VM/VAppliance1.01.vmdk: XX% done.
Export completed successfully!
Take a look at the amount of compression you received during the conversion. Are you impressed? Now tar and gzip your ovf and related disk files vs what you get if you simply tar and gzip your virtual machine.
Love it or hate it, OVF is meant to make everyoneâ€™s life easierâ€”as are all standards. For those who create and deploy portable virtual machines and appliances, OVF makes sense but from a userâ€™s perspective, often you just want to unzip a virtual machine, open it in VI Client and get to work. This extra step might seem painful, at first, but youâ€™ll enjoy the shortened download times due to the compression ratios. Give VMwareâ€™s ovfTool a spin for yourself and let me know how you like it.