exec_command
Execute commands in QEMU VMs via the guest agent, with configurable timeout. Requires qemu-guest-agent running inside the VM.
Instructions
Execute a command inside a QEMU VM via the guest agent.
Requires qemu-guest-agent to be installed and running inside the VM. Not supported for LXC containers.
Args: vmid: The numeric ID of the VM. command: The command to execute (e.g. 'hostname', 'df -h', 'systemctl status nginx'). timeout: Max seconds to wait for command completion (default 30, max 300).
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": {
"vmid": "<vmid>",
"command": "<command>"
},
"name": "exec_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vmid | Yes | ||
| command | Yes | ||
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |