post

/vms/{uuid}/set_power_state

Set power state of a Virtual Machine.

If the Virtual Machine is being powered on and no host is specified, the scheduler will pick the one with the most available CPU and memory that can support the Virtual Machine. Note that no such host may not be available.

If the Virtual Machine is being power cycled, a different host can be specified to start it on.

The logical timestamp can optionally be provided for consistency. If a logical timestamp is specified, then this operation will be rejected if the logical timestamp specified is not the value of the Virtual Machine logical timestamp. The logical timestamp can be obtained from the Virtual Machine object.

This is also an asynchronous operation that results in the creation of a task object. The UUID of this task object is returned as the response of this operation. This task can be monitored by using the /tasks/poll API.

Request Parameters

1 Path Parameter

Request Body

Virtual Machine Power State Info

Schema
object
host_uuid
string
transition
string
1 validation
uuid
string
vm_logical_timestamp
integer
1 validation

Responses

Successful operation

Schema
object
task_uuid
string

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
Path Params
1 path param not set
uuid
$$.env
No $$.env variables are being used in this request.