list_virtual_machines
List VMware virtual machines with filtering by power state, folder path, and custom fields. Sort results and limit output for efficient inventory management.
Instructions
[READ] List virtual machines with optional filtering, sorting, and field selection.
Returns a dict: {total, mode, vms, hint}. Each VM entry includes a
folder_path field showing the vCenter inventory folder path
(e.g. /Colocation/Colo - ISER).
Auto-compact: when no limit/fields are set and inventory exceeds 50 VMs, returns compact fields (name, power_state, cpu, memory_mb, folder_path) to keep context manageable. Set limit or fields to override.
Args:
target: Optional vCenter/ESXi target name from config. Uses default if omitted.
limit: Max number of VMs to return (None = all).
sort_by: Sort field: "name" | "cpu" | "memory_mb" | "power_state" | "folder_path".
power_state: Filter by power state: "poweredOn" | "poweredOff" | "suspended".
fields: Return only these fields (None = auto-select based on inventory size).
Available: name, power_state, cpu, memory_mb, guest_os, ip_address,
host, uuid, tools_status, folder_path.
folder_filter: Case-insensitive substring match against folder_path.
Example: folder_filter="Colocation" returns VMs anywhere under
a Colocation folder, including nested subfolders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| fields | No | ||
| target | No | ||
| sort_by | No | name | |
| power_state | No | ||
| folder_filter | No |