VMware, Inc.
87
Chapter 5 Datacenter Operations
Get a Screen Ticket for a Virtual Machine
An
acquireTicket
request
returns
a
ticket
that
a
client
can
use
to
gain
access
to
the
console
of
a
virtual
machine.
Example 5-32.
Get a Screen Ticket for a Virtual Machine
Request:
POST http://vcloud.example.com/api/v1.0/vApp/vm-4/screen/action/acquireTicket
Response:
200 OK
Content-Type: application/vnd.vmware.vcloud.screexml
...
<ScreenTicket xmlns="http://www.vmware.com/vcloud/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.vmware.com/vcloud/v1 ...>
mks://10.147.43.171/vm-61?ticket=Pznh4HMb7k%2FlniSLwyAD1fmlPIXOuSACKgEReF7ylTIn4qRkxhFv9QT7I3
SLTAQu%2F7W5RxVpDxjVKuuHQ4VIwu59F%2FG1WL1OmYMWistJC9tkRjQ1RRQiB1Oem5E7qX9O
</ScreenTicket>
Provide User Input Requested by a Virtual Machine
A
request
for
a
virtual
machine
to
change
state
(power
on,
suspend,
reconfigure,
and
so
on)
might
cause
the
virtual
machine
to
ask
for
additional
user
input
before
it
can
complete.
A
vApp
that
contains
a
Vm
awaiting
a
user
response
has
status="5"
,
and
includes
a
link
with
rel="down"
and
type="application/vnd.vmware.vcloud.vmPendingQxml"
that
a
client
can
GET
to
discover
what
input
is
needed.
In
this
series
of
examples,
a
virtual
machine
that
was
recently
reconfigured
in
vCenter
to
add
a
new
parallel
port
device
and
then
powered
on
is
requesting
user
input
about
where
to
send
output
from
the
device.
The
powerOn
request
cannot
complete
until
this
input
is
supplied.
Example 5
‐
33
shows
the
link
to
the
question,
in
the
body
of
the
vApp
.
Example 5-33.
vApp Requesting Input
Request:
GET http://vcloud.example.com/api/v1.0/vApp/vapp-7
Response:
200 OK
Content-type: application/vnd.vmware.vcloud.vApp+xml
...
<VApp name="Linux FTP server" status="5" href="http://vcloud.example.com/api/v1.0/vApp/vapp-7"
...>
...
<Link rel="down" type="application/vnd.vmware.vcloud.vmPendingQxml"
href="http://vcloud.example.com/api/v1.0/vApp/vm-5/question"/>
...
<Description>Example FTP Server</Description>
...
<Children>
...
</Children>
</vApp>
Содержание 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...