5. Creating and Managing vApps : 5.4 vApp Deployment Readiness : 5.4.5 OVF Properties
5.4.5 OVF Properties
When users migrate virtual machines from any virtualization environment to vCloud Director, the OVF format is required. vCloud Director imports virtual machine artifacts in the OVF format. Open Virtualization Application (OVA) format is not supported for importing vApps in vCloud Director. The difference between OVF and OVA, which is usually a tar file with the same contents as several OVF files, is that OVA can have multiple virtual machines with a single metadata file.
Users can pass custom properties when importing via OVF properties. This creates opportunities for further customization of virtual machines.
The vCloud API and the user interface support OVF properties. OVF properties can take any of the following forms:
*String Choice
*Custom Types
The guest operating system can use the following mechanisms to get these properties:
*ISO image mounted on the first available CD-ROM drive in the guest operating system. The properties can be read from an XML file named ovf-env.xml in the root directory of the mounted image. This method can be used even if VMware Tools is not installed.
*With VMware Tools installed, the guest operating system can access the properties by issuing a vmtoolsd query:
vmtoolsd --cmd "info-get guestinfo.ovfEnv"
Programs or scripts executed within the guest OS can obtain these OVF properties. This provides the potential for:
*Passing in configuration parameters.
*Passing a message to a program or script, enabling dynamic behavior.
*Allowing users to select from an options list to pass in information (using the String Choice property type).
Programs or scripts running in the guest operating system can query OVF properties at any time. One use case runs a script when the guest operating system boots. This script obtains the OVF properties and follows a set of decision paths to configure the system based on these values.
Another use case executes an automatically scheduled script or program to query the OVF properties at known intervals. If OVF properties change between iterations, the scheduled script or program can alter its behavior as the message changes.
As with the vSphere API Guest Operations (formerly the VIX API), the guest operating system does not need to be connected to a network to enable OVF properties to be read. The properties are made available to the guest OS with VMware Tools or as a file contained in an ISO image mounted on a CD-ROM drive.
The vCloud API provides calls to get and set OVF properties. It can be used to query vApp templates and instantiated vApp objects to obtain ProductSections that contain the ProductSectionList. When using the vCloud API to add, update, or remove a property, you must supply a ProductSectionList object.
With the vCloud Director UI, you can set OVF property values when you add a new vApp. To set properties on an instantiated vApp, vCloud Director provides tabs to configure custom properties at the vApp and virtual machine levels.
For more information on using the properties, see Leveraging vApp & VM Custom Properties In vCloud Director (http://blogs.vmware.com/vsphere/2012/06/leveraging-vapp-vm-custom-properties-in-vcloud-director.html).