vsphere_change_vm_power_state
Control virtual machine power: power on/off, suspend, reset, or trigger clean guest shutdown/reboot to prevent data loss.
Instructions
Change the power state of a virtual machine.
Prefer the guest actions when VMware Tools is running: shutdown_guest
and reboot_guest let the operating system shut down cleanly, whereas
power_off and reset are the equivalent of pulling the plug and
can lose unwritten data.
Guest actions complete inside the guest and return as soon as vSphere
has passed the request to VMware Tools, so wait does not apply to
them.
Requires permission mode write or higher.
Args:
vm: VM name, managed object id, UUID or inventory path.
action: One of power_on, power_off, suspend, reset,
shutdown_guest, reboot_guest or standby_guest.
wait: Wait for the vSphere task to finish before returning.
timeout_seconds: Override the default task timeout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vm | Yes | ||
| wait | No | ||
| action | Yes | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||