vm_run
Run a program in a throwaway clone.
Clones a machine (or one of its snapshots), starts the clone, copies files in, runs the program, copies files out whether it succeeded or not, and deletes the clone whatever happens; a clone the person took control of stays until they give it back, close its window or stop it. Returns the exit status and output like vm_exec. With desktop, a clone at its login screen is signed in first with the source's password. The source machine is not changed. A macOS clone waits while two macOS machines run.
- Profiles
- full
- Read-only
- No
- Destructive
- No
- Idempotent
- No
- Open world
- Yes
- Runs as a task
- Optional
Parameters
architecturestringWhich code of a program built for several architectures runs.
One of
arm64,x64.argvarray of stringsRequiredThe program and its arguments. No shell interprets them: pass ["sh", "-c", "..."].
copy_inarray of objectscopy_in[].guest_pathstringRequiredAn absolute path in the guest.
copy_in[].host_pathstringRequiredAn absolute path on this Mac.
copy_outarray of objectsCopied to the Mac afterwards; what arrives is quarantined, as a download is.
copy_out[].guest_pathstringRequiredAn absolute path in the guest.
copy_out[].host_pathstringRequiredAn absolute path on this Mac.
cwdstringWorking directory; default the account's home, C:\, or the user's profile with desktop.
desktopbooleanRun as the user signed in at the screen, on their desktop; user then names the account expected there. Default false.
envarray of stringsVariables to add to the environment, as NAME=value.
queuebooleanWaits while two macOS machines run, or the two machines OSMates Free runs; false refuses. Default true.
snapshotstringA snapshot of it to clone instead.
sourcestringThe machine to clone; default the template for agents.
timeout_secondsintegerKilled after this long; default 600, none in the background.
From 1 to 3600.
userstringThe guest account to run as; default root; in Windows only with desktop.
wait_secondsintegerSeconds to wait before answering with a job to follow; default 20.
From 0 to 30.
workspaceobjectCopied in before copy_in; its diff comes out after copy_out.
workspace.diff_pathstringWhere the patch goes on this Mac; default ~/Library/Application Support/OSMates/Workspaces.
workspace.guest_pathstringWhere it goes in the guest; default the account's home and the folder's name.
workspace.host_pathstringRequiredA folder on this Mac, a git work tree's top or any other.
Output
The result's structured content is one of these objects.
JSON Schema: /schemas/0/mcp/tools/vm_run/output.json
running
jobstringRequiredstatestringRequiredOne of
running.
run
clockobjectHolds one key:
synced,driftedorunchecked.clock.syncedobjectclock.driftedobjectclock.uncheckedobjectclonestringRequiredcopiedOutarray of objectsRequiredcopiedOut[].bytesintegerRequiredAt least 0.
copiedOut[].destinationstringRequiredcopiedOut[].filesintegerRequiredcopiedOut[].sha256stringcopiedOut[].verificationobjectRequiredexitCodeintegerjobstringRequiredmachinestring (uuid)Requirednetworkstring or objectOne of
connected,noAddress,off,detached, or an object that holds one key:noDNS,isolated,tunnelUnchecked,lost,unchecked,restrictedorhostOnly.network.noDNSobjectnetwork.isolatedobjectnetwork.tunnelUncheckedobjectnetwork.lostobjectnetwork.uncheckedobjectnetwork.restrictedobjectnetwork.hostOnlyobjectsignalintegerstderrobjectRequiredstderr.bytesintegerRequiredAt least 0.
stderr.encodingstringOne of
base64.stderr.guestDatastringRequiredstderr.shownintegerRequiredAt least 0.
stdoutobjectRequiredstdout.bytesintegerRequiredAt least 0.
stdout.encodingstringOne of
base64.stdout.guestDatastringRequiredstdout.shownintegerRequiredAt least 0.
timedOutbooleanRequiredverificationobjectRequiredverification.evidencestringRequiredverification.statusstringRequiredOne of
verified,unverified,failed.workspaceobjectworkspace.patchobjectRequiredworkspace.patchBytesintegerRequiredAt least 0.
workspace.patchPathstringRequiredworkspace.reportobjectRequiredworkspace.reportPathstringRequired
Fields nested deeper are in the schema.