Before you can download a vApp or vApp template, an administrator or privileged user must enable the object for download.

Prerequisites

  • Verify that you are logged in as a user who has privileges to enable a vApp or vApp template for download.
  • Verify that any vApp you plan to enable for download is powered off and undeployed. See Undeploy, Power Off, and Delete the vApp.

Procedure

  1. Retrieve the XML representation of the VApp or VAppTemplate object.
  2. Examine the representation to find its action/enableDownload link.
    Every VAppTemplate element includes a link of the following form, where id is the id of the template:
    <Link
       rel="enable"
       href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-id/action/enableDownload"/>
    Every vApp element includes a similar link:
    <Link
       rel="enable"
       href="https://vcloud.example.com/api/vApp/id/action/enableDownload"/>
  3. Enable the object for download.
    Make a POST request to the action/enableDownload URL, which you retrieved in Step 2. The response is a Task that tracks the completion of the enablement operation.
  4. When the task completes, retrieve the representation of the object, which now contains OVF and OVA download URLs with default and identity contents.
    Download URLs remain valid while a transfer session is in progress, and for a maximum of 60 minutes of transfer session idle time. A system administrator can change this default value. See Retrieve or Update System Settings.

Example: vApp Template with Download URLs

Request:
GET https://vcloud.example.com/api/vAppTemplate/vappTemplate-111

This download-enabled VAppTemplate object include four download Link elements. The default links exclude information such as MAC address, BIOS UUID, and NetworkConfigSection that is included in the identity download links.

Response:
200 OK
Content-Type: application/vnd.vmware.vcloud.vAppTemplate+xml
...
<VAppTemplate 
   ovfDescriptorUploaded="true" 
   status="8" 
   name="Ubuntu Template" 
   ... >
   ...
   <Link type="text/xml" 
      rel="download:default" 
      href="https://vcloud.example.com/transfer/.../descriptor.ovf"/>
   <Link type="text/xml" 
      rel="download:identity" 
      href="https://vcloud.example.com/transfer/.../descriptor-with-id.ovf"/>
   <Link type="text/xml" 
      rel="download:ovaDefault" 
      href="https://vcloud.example.com/transfer/.../descriptor.ova"/>
   <Link type="text/xml" 
      rel="download:ovaIdentity" 
      href="https://vcloud.example.com/transfer/.../descriptor-with-id.ova"/>
   ...  
 ...
</VAppTemplate>