vcenter vm guest power: shutdown

Issues a request to the guest operating system asking it to perform a clean shutdown of all services. This request returns immediately and does not wait for the guest operating system to complete the operation. This operation was added in vSphere API 6.7

Request:

HTTP request

POST https://{server}/rest/vcenter/vm/{vm}/guest/power?action=shutdown

Path Parameters

Name Type Description
Required
vm string Identifier of the virtual machine.

Response:

HTTP Status Code: 200

None

Errors:

HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
404 not_found if the virtual machine is not found.
400 already_in_desired_state if the virtual machine is not powered on.
503 service_unavailable if VMware Tools is not running.
400 not_allowed_in_current_state if the virtual machine is suspended.
400 resource_busy if the virtual machine is performing another operation.
400 unsupported if the virtual machine does not support being powered on (e.g. marked as a template, serving as a fault-tolerance secondary virtual machine).