run_script_in_guest
Execute inline scripts inside a VMware guest OS, with optional timeout and no-wait support; redirect output to a guest file for later retrieval when full stdout capture is needed.
Instructions
Execute inline script text inside the guest OS (runScriptInGuest).
Note: vmrun itself does not stream guest stdout back to the host; redirect
output to a file inside the guest and retrieve it with copy_file_guest_to_host
if you need full stdout capture.
Args: vm: VM name, substring, or full .vmx path. interpreter: Interpreter absolute path in guest (e.g. '/bin/bash' or 'C:\Windows\System32\cmd.exe'). script_text: Script body to execute. guest_user: Guest OS username. guest_password: Guest OS password (masked in logs/responses). no_wait: Return immediately without waiting for completion. timeout: Subprocess timeout in seconds.
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": {
"vm": "<vm>",
"interpreter": "<interpreter>",
"script_text": "<script_text>"
},
"name": "run_script_in_guest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vm | Yes | ||
| no_wait | No | ||
| timeout | No | ||
| guest_user | No | ||
| interpreter | Yes | ||
| script_text | Yes | ||
| guest_password | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||