VMware, Inc.
65
Chapter 5 Datacenter Operations
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.composeVApxml
...
<ComposeVAppParams name="Example Corp’s CRM Appliance" xmlns="http://www.vmware.com/vcloud/v1"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<InstantiationParams>
<NetworkConfigSection>
<ovf:Info>Configuration parameters for logical networks</ovf:Info>
<NetworkConfig networkName="CRMApplianceNetwork">
<Configuration>
<ParentNetwork href="http://vcloud.example.com/api/v1.0/network/54"/>
<FenceMode>bridged</FenceMode>
</Configuration>
</NetworkConfig>
</NetworkConfigSection>
</InstantiationParams>
<Item>
<Source href="http://vcloud.example.com/api/v1.0/vApp/vm-4"/>
<InstantiationParams>
<NetworkConnectionSection
type="application/vnd.vmware.vcloud.networkConnectionxml"
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>
Содержание VCLOUD API 1.0 - TECHNICAL NOTE
Страница 10: ...vCloud API Programming Guide 10 VMware Inc...
Страница 20: ...vCloud API Programming Guide 20 VMware Inc...
Страница 32: ...vCloud API Programming Guide 32 VMware Inc...
Страница 90: ...vCloud API Programming Guide 90 VMware Inc...
Страница 150: ...vCloud API Programming Guide 150 VMware Inc...
Страница 170: ...vCloud API Programming Guide 170 VMware Inc...
Страница 202: ...vCloud API Programming Guide 202 VMware Inc...
Страница 212: ...vCloud API Programming Guide 212 VMware Inc...