ensure_tester_vm
Get-or-create your desktop tester VM for an app (idempotent).
ONE reused VM per app: call with app='' and you always get the same of-tester-- VM (the same one the app's test-run pool uses). Reuses it if running, restarts it if stopped, creates it from the pinned tester ISO (XFCE
Firefox) if missing. Ordinary testers do not autostart after host reboots and can be reclaimed by idle retention when unleased and unreferenced. Explicitly pinned warm-pool testers retain autostart and pool protection. Delete a tester explicitly with delete_vm when you no longer want it. Ephemeral by default (no persistence disk) so a fresh tester comes up fast and agent-ready within a typical tool-call timeout; pass persistence_gb>0 to add a Zone-2 disk whose contents survive reboots.
Then drive it with desktop_open_url / desktop_screenshot / desktop_click etc., and record what you test with start_app_test.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ensure_tester_vm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | App this tester is for, e.g. 'knostra'. Identity is tied to the app's URL host (see app_url): you get ONE reused VM per app/host, shared with that app's test-run pool — the same app always returns the same VM. To run more tests at once, scale the app's pool with scale_tester_pool instead of creating extra VMs. | |
| vcpus | No | Virtual CPUs (create only) | |
| lab_id | No | Owned private lab; selects a fresh lab-scoped tester rather than an app pool | |
| api_key | No | Your OpenFactory MCP API key (optional) | |
| app_url | No | The app's URL, e.g. 'https://staging.knostra.ai'. The tester VM is keyed by this URL's host so every run for the same app/env reuses ONE VM. Pass it whenever known; falls back to keying by `app` when omitted. | |
| memory_mb | No | VM memory in MB (create only) | |
| wait_seconds | No | How long to wait for the guest agent before returning (0-480). Keep this under your MCP client's per-call timeout (often ~120s): the call returns as soon as the agent is ready (~45-60s for a fresh ephemeral tester), so the default 90 leaves margin and won't hang the tool call to a client-side timeout. | |
| session_token | No | Session token from a previous tool response (pass this to maintain session continuity) | |
| lab_network_id | No | Logical tester network belonging to that lab | |
| persistence_gb | No | Zone-2 persistence disk size in GB (create only). Default 0 = no persistence disk: an ephemeral tester provisions fast and reliably. A persistence disk triggers a first-boot init+reboot that can push provisioning past a client's tool-call timeout (and can leave the guest agent down mid-reboot) — only set >0 (or -1 for the server default) if you truly need state to survive reboots. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||