vm_power_off
Power off a virtual machine: graceful guest shutdown via VMware Tools, or hard power-off with force=True. Returns shutdown status or retry hint.
Instructions
[WRITE] Power off a VM — graceful guest shutdown by default, hard power-off with force=True.
Graceful mode calls VMware Tools guest shutdown and waits up to 120s; if Tools is not running or shutdown stalls, the response tells you to retry with force=True. An already-off VM returns success without change. Audited to ~/.vmware/audit.db. Use vm_power_on to start a VM; vm_delete requires the VM to be off first.
Args: vm_name: Exact VM name as shown in vCenter inventory (case-sensitive). force: False (default) = graceful guest shutdown via VMware Tools; True = immediate hard power-off (risks guest filesystem damage). target: vCenter/ESXi target name from config.yaml; omit to use the default target.
Returns: Status string: shut down, force powered off, already off, or a Tools-unavailable hint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vm_name | Yes | ||
| force | No | ||
| target | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |