pve_vm_power
Manage power state of virtual machines and containers on Proxmox VE: start, shutdown, stop, reboot, suspend, or resume. Shutdown performs clean guest shutdown; stop hard-power offs.
Instructions
Change the power state of a VM or container.
Applies to: QEMU VMs and LXC containers, located by ``vmid`` (``node``
optional and auto-resolved). ``action`` is one of ``start``,
``shutdown`` (clean, via guest), ``stop``, ``reboot``, ``suspend``,
``resume``. NOTE: ``stop`` is a hard power-off (like pulling the plug) —
prefer ``shutdown`` unless the guest is unresponsive. ``suspend`` /
``resume`` are QEMU-only; containers must use shutdown/stop/start.
``timeout`` (seconds) applies to shutdown/reboot (and QEMU stop) as the
max wait for the guest.
Side effects: changes guest power state. Waits up to PVE_MCP_TASK_WAIT
seconds for the PVE task; returns JSON with ``vmid``/``node``/``type``/
``action`` and ``task`` (``exitstatus`` "OK", failure + ``log_tail``, or
``status`` "running" with the ``upid`` to follow up via pve_task_status).
Source: POST /nodes/{node}/{qemu|lxc}/{vmid}/status/{action}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | No | ||
| vmid | Yes | ||
| action | Yes | ||
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |