Finding Virtual Machine Urls To Use In A Composition Item - VMware VCLOUD API 1.0 - API Programming Manual

Table of Contents

Advertisement

vCloud API Programming Guide
</NetworkConnectionSection>
</InstantiationParams>
</Item>
<Item>
<Source href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-114"/>
</Item>
<Item>
<Source href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-190"/>
</Item>
<AllEULAsAccepted>true</AllEULAsAccepted>
</ComposeVAppParams>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vApp+xml
...
<VApp name="Example Corp's CRM Appliance" type="application/vnd.vmware.vcloud.vApp+xml"
<Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
<Description>Composed CRM Appliance</Description>
...
<Tasks>
<Task ...>
...
</Task>
</Tasks>
</VApp>
The response is similar to the one shown in Example
element. The status of the vApp is initially 0. When composition is complete, the status changes to 1.

Finding Virtual Machine URLs to Use in a Composition Item

Virtual machines (Vm objects) are not listed in catalogs or vDCs. To find the URL of a Vm URL to include in a 
composition item Source, GET a vApp or vApp template that includes it, and examine the Children 
container of the VApp element. Each Vm in this container has an href attribute whose value you can use to 
reference the Vm for this (or any other) purpose. 
N
   To be included in a composition request, a Vm must be powered off (status="8").
OTE
The Vm URL used in Example 5‐4 appears in the Children element of Example
Example 5-5. Vm URL in a vApp Body
Request:
GET http://vcloud.example.com/api/v1.0/vApp/vapp-7
Response:
200 OK
Content-type: application/vnd.vmware.vcloud.vApp+xml
...
<VApp name="Linux FTP server" status="8" href="http://vcloud.example.com/api/v1.0/vApp/vapp-7"
...
<Children>
<Vm status="8" href="http://vcloud.example.com/api/v1.0/vApp/vm-4" ...>
...
</Children>
</VApp>
66
status="8" href="http://vcloud.example.com/api/v1.0/vApp/vapp-33" ...>
href="http://vcloud.example.com/api/v1.0/vdc/5"/>
...>
5‐1, a sparsely populated vApp body that contains a Task 
5‐5.
VMware, Inc.

Advertisement

Table of Contents
loading

Table of Contents