To deploy your template as a vApp, you must specify an organization vDC to deploy it in and an organization vDC network to connect it to.

Instantiation, deployment, and operation of a vApp all take place in the context of an organization vDC. The XML representation of a vDC object defines that context in detail. For this exercise, you need several pieces of information from the vDC:

The URL that a client can use to request an instantiateVAppTemplate operation in the vDC.

A list of networks in the organization vDC that the vApp can connect to.

Example: Deployment Information in a vDC shows this subset of vDC contents.

Verify that the following conditions are met:

Verify that you are logged in to the vCloud API as a system administrator or member of an organization in the cloud.

Retrieve the representation of your organization. See the request portion of Example: Retrieve the Contents of an Organization. The response portion contains links to the organization's vDCs.

1

Examine the Org response to find the links to the organization's vDCs.

Links to vDCs have the form:

<Link
   rel="down"
   type="application/vnd.vmware.vcloud.vdc+xml"
   href="https://vcloud.example.com/api/vdc/id"
   name="vDC_name" />
2

Retrieve the contents of the vDC.

Use a GET request of the form shown in the request portion of Example: Deployment Information in a vDC.

This example shows a request to retrieve the XML representation of a vDC. It shows only the subset of the response that contains deployment information.

Request:

GET https://vcloud.example.com/api/vdc/5

Response:

200 OK
Content-Type: application/vnd.vmware.vcloud.vdc+xml
...
<Vdc
   xmlns="http://www.vmware.com/vcloud/v1.5"
   name="ExampleVdc01"
   type="application/vnd.vmware.vcloud.vdc+xml"
   href="https://vcloud.example.com/api/vdc/5">
   ...
   <Link
      rel="add"
      type="application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml"
      href="https://vcloud.example.com/api/vdc/5/action/instantiateVAppTemplate" />
   ...
   <AvailableNetworks>
      <Network
         href="https://vcloud.example.com/api/network/14"
         type="application/vnd.vmware.vcloud.network+xml"
         name="Isolated" />
      <Network
         href="https://vcloud.example.com/api/network/54"
         type="application/vnd.vmware.vcloud.network+xml"
         name="Internet" />
   </AvailableNetworks>
   ...
</Vdc>

The information that you need is available in the following elements of the response:

A Link element that contains an action URL for instantiateVAppTemplate. The rel attribute of this link has a value of add. It implements an action that adds an object (a vApp) to the vDC.

A list of AvailableNetworks that includes all the networks in the vDC.