5.5

Table Of Contents
Example: Create a vApp From an OVF Package
This request includes a NetworkMapping element that maps a network name found in the uploaded OVF
descriptor to the name of a network available in the target VDC.
Request:
POST https://vcloud.example.com/api/vdc/5/action/instantiateOvf
Content-Type: application/vnd.vmware.vcloud.instantiateOvfParams+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<InstantiateOvfParams
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
xmlns="http://www.vmware.com/vcloud/v1.5"
name="W2K8">
<Description>Example vApp</Description>
<InstantiationParams>
<NetworkConfigSection>
<ovf:Info>Configuration parameters for logical networks
</ovf:Info>
<NetworkConfig
networkName="vAppNetwork">
<Configuration>
<ParentNetwork
href="https://vcloud.example.com/api/network/54" />
<FenceMode>bridged</FenceMode>
</Configuration>
</NetworkConfig>
</NetworkConfigSection>
</InstantiationParams>
<AllEULAsAccepted>true</AllEULAsAccepted>
<NetworkMapping>
<Source>Network 1</Source>
<Target>vAppNetwork</Target>
</NetworkMapping>
<InstantiateVmParams
id="VM-1">
<Name>VM-1</Name>
<NetworkConnectionSection>
<ovf:Info />
<PrimaryNetworkConnectionIndex>0</PrimaryNetworkConnectionIndex>
<NetworkConnection
network="Network 1">
<NetworkConnectionIndex>0</NetworkConnectionIndex>
<IsConnected>true</IsConnected>
<IpAddressAllocationMode>POOL</IpAddressAllocationMode>
</NetworkConnection>
</NetworkConnectionSection>
<ComputerName>W2K8</ComputerName>
</InstantiateVmParams>
</InstantiateOvfParams>
The response is a sparsely populated VApp element that includes an upload URL for the OVF descriptor. See
“Uploading Referenced Files,” on page 66 for file upload procedures.
Chapter 5 Deploying and Operating vApps
VMware, Inc. 99