VMware, Inc.
81
Chapter 5 Datacenter Operations
Example 5-19.
Deploy and Power On a vApp or Virtual Machine
Request:
POST http://vcloud.example.com/api/v1.0/vApp/vapp-7/action/deploy
Content-type: application/vnd.vmware.vcloud.deployVApxml
...
<DeployVAppParams powerOn="true" xmlns="http://www.vmware.com/vcloud/v1"/>
Response:
202 Accepted
Content-Type: application/vnd.vmware.vcloud.task+xml
...
<Task ... operation="Starting Virtual Application Linux FTP server (7) ...>
...
</Task>
Undeploy a vApp or Virtual Machine
Undeploying
a
vApp
powers
off
or
suspends
any
running
virtual
machines
it
contains,
then
frees
the
resources
reserved
for
the
vApp
and
sets
the
vApp’s
deployed
attribute
to
a
value
of
false
to
indicate
that
it
is
not
deployed.
Undeploying
a
virtual
machine
powers
off
or
suspends
the
virtual
machine,
then
frees
the
resources
reserved
for
it
and
sets
the
its
deployed
attribute
to
a
value
of
false
to
indicate
that
it
is
not
deployed.
This
operation
has
no
effect
on
the
containing
vApp.
The
saveState
attribute
specifies
whether
the
undeployed
virtual
machines
are
suspended
and
their
suspend
state
saved,
or
simply
powered
off.
The
request
body
in
each
case
is
an
Un
deployVAppParams
element.
Example 5-20.
Undeploy a vApp or Virtual Machine
Request
to
undeploy
a
vApp:
POST http://vcloud.example.com/api/v1.0/vApp/vapp-7/action/undeploy
Content-type: application/vnd.vmware.vcloud.undeployVApxml
...
<UndeployVAppParams saveState="true" xmlns="http://www.vmware.com/vcloud/v1"/>
Request
to
undeploy
a
Vm:
POST http://vcloud.example.com/api/v1.0/vApp/vm-5/action/undeploy
Content-type: application/vnd.vmware.vcloud.undeployVApxml
...
<UndeployVAppParams saveState="true" xmlns="http://www.vmware.com/vcloud/v1"/>
Response:
202 Accepted
Content-Type: application/vnd.vmware.vcloud.task+xml
...
<Task ...>
...
</Task>
Power On a vApp or Virtual Machine
A
powerOn
request
to
a
vApp
URL
powers
on
all
of
the
virtual
machines
in
the
vApp,
as
specified
in
the
vApp’s
ovf:StartupSection
element.
A
powerOn
request
to
a
virtual
machine
URL
powers
on
the
specified
virtual
machine
and
forces
deployment
of
the
parent
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...