Home > Blogs > VMware vApp Developer Blog


The VMware Studio vApp Profile: Adding Existing OVFs

To create a vApp, VMware Studio uses a separate profile to specify the VMs to  include when constructing the  vApp, as well  as other various vApp-level parameters.


The  VMs  can  be specified  in  a  few  different  ways in  the  vApp profile. The relevant section in the XML looks something like this:


    <vadk:VMCollection>
        <vadk:VM
            vadk:ovfid="centos53"
            vadk:appurl="true"
            vadk:profile="centos53"
            vadk:location="http://[VADK.localIP]/build/centos53.1/exports/ovf/VM_OVF10.ovf"/>
        <vadk:VM
            vadk:ovfid="centos53 1"
            vadk:appurl="false"
            vadk:profile="centos53"
            vadk:location="http://[VADK.localIP]/build/centos53.1/exports/ovf/VM_OVF10.ovf"/>
    </vadk:VMCollection>

The vadk:ovfid attribute is a unique identifier for this VM. This will be used as a prefix to make any identical names in each VM unique. For example, the default Network label in a VM created by VMware Studio is called "Network 1".  In order for the VMs to be  able to have distinct networks, the   VM's   Network   labels  are   prefixed   with   the vadk:ovfid. Note that when vadk:ovfid is used to prefix filenames, any spaces in the vadk:ovfid will be replaced with underscores (_).


The vadk:appurl attribute is a boolean value  specifying that vCenter should use this VM's AppUrl value for the link in the Summary tab.


The  vadk:profile attribute  is  a pathname  to  the associated  build profile  for this  VM.  If  it  is solely  a filename  without an  xml extension (as it is here: centos53),  the filename is assumed to be in the     default    directory     where    profiles     are    created: /opt/vmware/var/lib/build/profiles/centos53.xml.    Note   that   this profile must  be configured  to produce an  OVF or  OVA as one  of its output formats (vadk:DistributionFormat).


The vadk:location attribute is where the location of an existing VM is specified. If vadk:location is empty,  then VMware Studio will use the value of  the vadk:profile attribute,  build the VM described  by this profile, and then include the resulting OVF or OVA in the vApp.


If the  vadk:location attribute is not empty,  it can contain one of several things:

  1. An absolute path (on VMware Studio) to a version 1.0 OVF or an OVA containing a version 1.0 OVF,
  2. A URL to a version 1.0 OVF or an OVA containing a version 1.0 OVF. In this URL, the keyword [VADK.localIP] may be used, and will be substituted with the actual IP address of the VMware Studio machine.


Note that the OVF or OVA specified does not need to have been built by VMware Studio. In particular, a  VM exported from vCenter can be used, as well as a third-party OVF or OVA. However, the use of a third-party OVF or  OVA is only supported on  a case by case  basis. VMware Studio cannot guarantee that the third-party OVF or OVA will combine properly into a vApp,  as the OVF specification is complex,  and it is possible that  a valid  OVF  may not  be  consumed by  the  VMware Studio  vApp building utility.


Let the VMware Studio team know of any difficulties you have with vApp construction, and we'll try to help.