exec
Execute a command inside a VM
Runs a command via the VM's guest agent and returns stdout, stderr, exit code, and timing. timeoutSec bounds server-side execution; clients should set their own HTTP timeout in addition.
502 responses are transient (worker unreachable, worker-side timeout, or worker 5xx — all collapsed into 502 at the scheduler). The SDK's run() helper does NOT auto-retry these by default: exec is not idempotent — if a 502 hides a successful exec, a retry may run the command twice. Callers opt in with max_retries=N per call.
post/v1/vms/{id}/exec
Request body
Response
Command result