VMware, Inc.
63
Chapter 5 Datacenter Operations
Examine
the
template’s
ovf:NetworkSection
element
to
see
whether
any
networks
are
defined
there.
If
the
vApp
template
includes
an
ovf:Network
element,
the
name
you
specify
for
the
vApp
network
must
match
the
name
specified
in
that
element’s
ovf:name
attribute.
See
“About
Instantiation
Parameters”
on
page 62.
Verify
that
your
organization’s
default
lease
settings
are
appropriate
for
this
vApp.
If
they
are
not,
you
can
specify
custom
lease
settings
as
part
of
instantiation.
Example 5
‐
1
shows
an
instantiation
request
similar
to
the
one
shown
in
Example 2
‐
6
on
page 25
,
but
includes
an
AllEULAsAccepted
element
that
denotes
acceptance
of
terms
and
conditions
embedded
in
the
child
Vm
elements,
and
a
LeaseSettingsSection
element
that
specifies
custom
deployment
and
storage
lease
terms
for
this
vApp.
It
also
specifies
that
the
vApp
should
be
deployed
and
powered
on
after
it
is
instantiated.
(If
you
omit
the
deploy
and
powerOn
attributes,
the
default
value
of
false
is
assumed.)
Example 5-1.
Instantiating a vApp Template wIth Custom Lease Settings
Request:
POST http://vcloud.example.com/api/v1.0/vdc/5/action/instantiateVAppTemplate
Content-Type: application/vnd.vmware.vcloud.instantiateVAppTemplatxml
...
<InstantiateVAppTemplateParams name="Linux FTP server" deploy=”true” powerOn=”true”
xmlns="http://www.vmware.com/vcloud/v1"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<Description>Example FTP Server</Description>
<InstantiationParams>
<NetworkConfigSection>
<ovf:Info>Configuration parameters for logical networks</ovf:Info>
<NetworkConfig networkName="vAppNetwork">
<Configuration>
<ParentNetwork href="http://vcloud.example.com/api/v1.0/network/54"/>
<FenceMode>bridged</FenceMode>
</Configuration>
</NetworkConfig>
</NetworkConfigSection>
<LeaseSettingsSection type="application/vnd.vmware.vcloud.leaseSettingsxml">
<ovf:Info>Lease Settings</ovf:Info>
<StorageLeaseInSeconds>172800</StorageLeaseInSeconds>
<StorageLeaseExpiration>2010-04-11T08:08:16.438-07:00</StorageLeaseExpiration>
</LeaseSettingsSection>
</InstantiationParams>
<Source href=”http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-111”/>
<AllEULAsAccepted>true</AllEULAsAccepted>
</InstantiateVAppTemplateParams>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vApp+xml
<VApp name="Linux FTP server" deployed=”false” status="0"
href="http://vcloud.example.com/api/v1.0/vApp/vapp-7" ...>
<Description>Example FTP Server</Description>
...
<Tasks>
<Task ... operation="Creating Virtual Application Linux FTP server(7)" ... >
...
</Task>
</Tasks>
</VApp>
Summary of Contents for VCLOUD API 1.0 - TECHNICAL NOTE
Page 10: ...vCloud API Programming Guide 10 VMware Inc...
Page 20: ...vCloud API Programming Guide 20 VMware Inc...
Page 32: ...vCloud API Programming Guide 32 VMware Inc...
Page 90: ...vCloud API Programming Guide 90 VMware Inc...
Page 150: ...vCloud API Programming Guide 150 VMware Inc...
Page 170: ...vCloud API Programming Guide 170 VMware Inc...