Compose a vApp
The vCloud API supports composing a vApp from any combination of vApp templates, vApps, or virtual
machines. When you compose a vApp, all children of each composition source become peers in the Children
collection of the composed vApp.
To compose a vApp, a client makes a composeVApp request whose body, a ComposeVAppParams element,
includes the following information:
An InstantiationParams element that applies to the composed vApp itself and any vApp templates
referenced in Item elements. For more information, see "About Instantiation Parameters" on page 62.
An Item element for each virtual machine, vApp, or vAppTemplate to include in the composition. Each
Item can contain the following elements:
A required Source element whose href attribute value is a reference to a vApp template, vApp, or
Vm to include in the composition. If the Source element references a Vm, the Item must also include
an InstantiationParams element specific to that Vm.
An optional NetworkAssignment element that specifies how the network connections of child Vm
elements are mapped to vApp networks in the parent.
If any of the composition items is subject to a EULA, the ComposeVAppParams element must include an
AllEULAsAccepted element that has a value of true, indicating that you accept the EULA. Otherwise,
composition fails.
The composed vApp must be deployed and powered on before it can be used.
Example
5‐4 shows a composeVApp request that specifies two vAppTemplate sources and one Vm source. The
Vm source requires InstantiationParams that modify its NetworkConnectionSection to specify the vApp
network created for this vApp. The vAppTemplate sources inherit this setting from the base
InstantiationParams element (the one that appears before the first Item is specified).
Example 5-4. Compose a vApp
Request:
POST http://vcloud.example.com/api/v1.0/vdc/5/action/composeVApp
Content-Type: application/vnd.vmware.vcloud.composeVAppParams+xml
...
<ComposeVAppParams name="Example Corp's CRM Appliance" xmlns="http://www.vmware.com/vcloud/v1"
<InstantiationParams>
<NetworkConfigSection>
<ovf:Info>Configuration parameters for logical networks</ovf:Info>
<NetworkConfig networkName="CRMApplianceNetwork">
</NetworkConfig>
</NetworkConfigSection>
</InstantiationParams>
<Item>
<Source href="http://vcloud.example.com/api/v1.0/vApp/vm-4"/>
<InstantiationParams>
<NetworkConnectionSection
VMware, Inc.
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<Configuration>
<ParentNetwork href="http://vcloud.example.com/api/v1.0/network/54"/>
<FenceMode>bridged</FenceMode>
</Configuration>
type="application/vnd.vmware.vcloud.networkConnectionSection+xml"
href="http://vcloud.example.com/api/v1.0/vApp/vm-4/
networkConnectionSection/" ovf:required="false">
<ovf:Info/>
<PrimaryNetworkConnectionIndex>0</PrimaryNetworkConnectionIndex>
<NetworkConnection network="CRMApplianceNetwork">
<NetworkConnectionIndex>0</NetworkConnectionIndex>
<IsConnected>true</IsConnected>
<IpAddressAllocationMode>DHCP</IpAddressAllocationMode>
</NetworkConnection>
Chapter 5 Datacenter Operations
65
Need help?
Do you have a question about the VCLOUD API 1.0 - API and is the answer not in the manual?
Questions and answers