Run Command in Guest
guest_run_commandExecute shell commands in a VMware guest VM and retrieve stdout output. Select the shell automatically or specify cmd, PowerShell, bash, or sh, with optional timeout.
Instructions
Execute a shell command inside the guest VM and return stdout. Uses the appropriate shell based on guest OS type (cmd/bash). Requires guest credentials in config and VMware Tools running in guest.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"command": "<command>"
},
"name": "guest_run_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vm | No | VM name or .vmx path | |
| shell | No | Shell to use. "auto" picks based on os_type | auto |
| command | Yes | Shell command to execute | |
| timeout_seconds | No | Max execution time in seconds (vmrun hard limit is 300s) |