Power Off VM operation
The Power Off VM operation powers off the virtual machine. If the <status> response element contains success, the <Task> response element contains the ID of the queued task, which you can use to obtain the task status.
The virtual machine does not attempt to shut down the guest OS gracefully.
The following table describes the elements for this request.
Adapter request elements for Power Off VM operation
Element | Definition | Required |
---|---|---|
<operation-type> | Defines the type of operation: Basic_Vm | Yes |
<operation-name> | Defines the name of operation: Power_Off_VM | Yes |
<soap-url> | Specifies the URL for the remote SOAP service running on the VMware VirtualCenter | No |
<transport> | Specifies the transport protocol for the message | No |
<user-name> | Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center | No |
<password> | Specifies the password corresponding to <user-name> | Conditional; required if <user-name> is specified |
<parameters> | Contains the <virtual-machine> element required to execute the operation | Yes |
<virtual-machine> | Contains the name of the virtual machine on which this operation is to be executed | Yes |
The following code sample shows a sample adapter request for the Power Off VM operation.
Sample adapter request for the Power Off VM operation
<operation-type>Basic_Vm</operation-type>
<operation-name>Power_Off_VM</operation-name>
<soap-url></soap-url>
<transport></transport>
<user-name></user-name>
<password></password>
<parameters>
<virtual-machine>win1</virtual-machine>
</parameters>
</vmware-infrastructure-request>
The following code sample shows the response for the sample Power Off VM operation.
Sample adapter response for the Power Off VM operation
<metadata>
<status>success</status>
</metadata>
<PowerOffVM_TaskResponse>
<Task>task-710</Task>
</PowerOffVM_TaskResponse>
</vmware-infrastructure-response>
The following table describes the response element.
Adapter response element for the Power Off VM operation
Element | Definition |
---|---|
<Task> | Specifies the task ID of the submitted task |