workspace/skills/pyats-linux-vmware/SKILL.md
VMware ESXi host operations via pyATS — VM inventory, snapshot management, hypervisor inspection across ESXi hosts in the testbed. Use when listing VMs on ESXi, checking snapshot age, auditing VMware inventory, or verifying pre-change snapshots exist.
npx skillsauth add automateyournetwork/netclaw pyats-linux-vmwareInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ESXi hosts must be defined in the pyATS testbed with os: linux (ESXi shell is Linux-based):
devices:
esxi-host-01:
os: linux
type: esxi
connections:
cli:
protocol: ssh
ip: 10.0.0.100
port: 22
credentials:
default:
username: "%ENV{NETCLAW_USERNAME}"
password: "%ENV{NETCLAW_PASSWORD}"
Note: SSH must be enabled on the ESXi host (disabled by default). Enable via vSphere Client → Host → Configure → System → Services → SSH → Start.
All commands use pyats_run_linux_command:
PYATS_TESTBED_PATH=$PYATS_TESTBED_PATH python3 $MCP_CALL "python3 -u $PYATS_MCP_SCRIPT" pyats_run_linux_command '{"device_name":"esxi-host-01","command":"<command>"}'
PYATS_TESTBED_PATH=$PYATS_TESTBED_PATH python3 $MCP_CALL "python3 -u $PYATS_MCP_SCRIPT" pyats_run_linux_command '{"device_name":"esxi-host-01","command":"vim-cmd vmsvc/getallvms"}'
Returns a table of all VMs on the ESXi host:
| Column | Description |
|--------|-------------|
| Vmid | Unique VM identifier (used as parameter for other vim-cmd operations) |
| Name | VM display name |
| File | Path to the VMX configuration file on the datastore |
| Guest OS | Configured guest OS type (e.g., ubuntu64Guest, windows9Server64Guest) |
| Version | Virtual hardware version (e.g., vmx-19, vmx-20) |
| Annotation | VM description/notes |
What to check:
PYATS_TESTBED_PATH=$PYATS_TESTBED_PATH python3 $MCP_CALL "python3 -u $PYATS_MCP_SCRIPT" pyats_run_linux_command '{"device_name":"esxi-host-01","command":"vim-cmd vmsvc/snapshot.get 1"}'
The parameter is the Vmid from vim-cmd vmsvc/getallvms. Returns the snapshot tree for that VM:
What to check:
pyats_list_devices → identify ESXi hosts in testbed
→ vim-cmd vmsvc/getallvms per host → collect all VMs
→ Cross-reference with NetBox/Nautobot → flag undocumented VMs
→ Check virtual hardware versions → flag outdated versions
→ GAIT
pyats_list_devices → identify ESXi hosts
→ vim-cmd vmsvc/getallvms per host → get VM IDs
→ vim-cmd vmsvc/snapshot.get per VM → collect snapshot trees
→ Flag: snapshots > 72 hours old, chains > 3 deep, orphaned snapshots
→ Severity-sort (stale snapshots = WARNING, deep chains = CRITICAL)
→ GAIT
ServiceNow CR must be in Implement state
→ vim-cmd vmsvc/getallvms → identify target VM by name → get Vmid
→ vim-cmd vmsvc/snapshot.get {vmid} → verify pre-change snapshot exists
→ If no snapshot: STOP — snapshot must be taken before changes
→ Record baseline state in GAIT
pyats_list_devices → identify all ESXi hosts
→ vim-cmd vmsvc/getallvms per host (parallel) → collect fleet-wide VM inventory
→ Aggregate: total VMs, VMs per host, hardware version distribution
→ Cross-reference with vCenter inventory (if available)
→ GAIT
Run VM inventory across multiple ESXi hosts concurrently:
# ESXi Host 1
PYATS_TESTBED_PATH=$PYATS_TESTBED_PATH python3 $MCP_CALL "python3 -u $PYATS_MCP_SCRIPT" pyats_run_linux_command '{"device_name":"esxi-host-01","command":"vim-cmd vmsvc/getallvms"}'
# ESXi Host 2
PYATS_TESTBED_PATH=$PYATS_TESTBED_PATH python3 $MCP_CALL "python3 -u $PYATS_MCP_SCRIPT" pyats_run_linux_command '{"device_name":"esxi-host-02","command":"vim-cmd vmsvc/getallvms"}'
# ESXi Host 3
PYATS_TESTBED_PATH=$PYATS_TESTBED_PATH python3 $MCP_CALL "python3 -u $PYATS_MCP_SCRIPT" pyats_run_linux_command '{"device_name":"esxi-host-03","command":"vim-cmd vmsvc/getallvms"}'
For snapshot checks, first collect VM IDs per host, then run snapshot queries in parallel across all VMs.
| Command | Description |
|---------|-------------|
| vim-cmd vmsvc/getallvms | List all registered VMs (ID, name, file, OS, version) |
| vim-cmd vmsvc/snapshot.get {vmid} | Get snapshot tree for a specific VM |
| vim-cmd vmsvc/power.getstate {vmid} | Get VM power state (on/off/suspended) |
| vim-cmd vmsvc/get.summary {vmid} | Get VM summary (CPU, memory, tools status) |
Note: Only getallvms and snapshot.get are covered by this skill. The reference above is for context — expand to other vim-cmd operations as needed.
| Skill | Integration | |-------|-------------| | pyats-linux-system | System-level commands on the ESXi host (ps, ls, docker stats) | | pyats-linux-network | ESXi host networking (interfaces, routes) — useful for vmkernel adapter inspection | | pyats-network | Network device show commands complement ESXi host-level views | | pyats-parallel-ops | pCall pattern for fleet-wide ESXi operations | | netbox-reconcile | Cross-reference VM inventory with NetBox virtualization records | | nautobot-sot | Validate ESXi host and VM data against Nautobot | | servicenow-change-workflow | Gate snapshot operations behind ServiceNow Change Requests | | gait-session-tracking | Every vim-cmd execution logged in GAIT | | nvd-cve | Check ESXi versions against NVD vulnerability database | | cml-lab-lifecycle | CML labs may run on ESXi — correlate VM inventory with CML topology |
pyats_list_devices first — verify ESXi hosts exist in the testbedgetallvms and snapshot.get are read-onlyvim-cmd vmsvc/power.* operations are destructive and require explicit authorizationgetallvms output; never guess or hardcodetesting
Human-in-the-loop escalation via HumanRail — route low-confidence agent decisions, pre-destructive operation approvals, and ambiguous incident tickets to real human engineers. Human answers are verified and returned as structured output. Workers are paid via Lightning Network. Use when the agent is uncertain, when a destructive change needs explicit human sign-off beyond a ServiceNow CR, or when an ambiguous ticket requires human triage before automated handling.
testing
Manage EVE-NG node lifecycle. Use when listing nodes, checking runtime state, creating or deleting nodes, starting or stopping nodes or whole labs, verifying node details, or wiping node NVRAM back to factory defaults.
development
Manage EVE-NG labs and platform inventory. Use when listing labs, checking lab metadata, creating or deleting labs, importing or exporting lab archives, checking EVE-NG health or auth, or verifying available node images before build work.
tools
Execute live CLI commands on running EVE-NG nodes over telnet console. Use when running show commands, making live config changes, verifying protocol state, testing connectivity, checking console readiness, or interacting with IOS, Junos, VPCS, EOS, or NX-OS nodes.