5.1

Table Of Contents
Response:
202 Accepted
Content-Type: application/vnd.vmware.vcloud.task+xml
...
<Task ...
operation="Updating Virtual Application Example Corp’s CRM Appliance (33)" ...>
...
</Task>
NOTE Virtual machines specified in Source elements must be powered off or this operation will fail. You can
use a query like this one to return a list of references to powered-off virtual machines that you have access to.
https://vcloud.example.com/api/query?type=adminVM&format=references&filter=status==POWERED_OFF
See Chapter 9, “Using the Query Service,” on page 247.
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 that you can GET to
discover what input is needed.
Prerequisites
Verify that you are logged in to the vCloud API as a system administrator or the object owner.
Procedure
1 Find the question link in the target vApp.
This link has the following form:
<Link
rel="down"
type="application/vnd.vmware.vcloud.vmPendingQuestion+xml"
href="http://vcloud.example.com/api/vApp/vm-5/question" />
2 Make a GET request to the URL in that link's href value.
The response is a VmPendingQuestion response that includes the question and the set of possible answers.
3 Create a VmQuestionAnswer element that supplies the answer.
See “Example: Provide User Input Requested by a Virtual Machine,” on page 92.
4 POST the element to the question/action/answer link included in the VmPendingQuestion response.
Example: Provide User Input Requested by a Virtual Machine
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.
The first step is to use the vmPendingQuestion link, shown in Step 1, to get a VmPendingQuestion response that
includes the question and the set of possible answers.
Request:
GET https://vcloud.example.com/api/vApp/vm-5/question
vCloud API Programming Guide
92 VMware, Inc.