Request an invite
Docs menu

osmates vm set

Change a machine's settings, at once when it runs.

Usage
osmates vm set [<options>] <machine>

Most settings change at once, also while the machine runs. --cpus, --memory, --processor-name, --network, --rosetta, --3d, --secure-boot, --security-key, --displays, --hdr and --nested-virtualization change only while it's shut down.

--disk grows the disk of a shut-down machine as a job that Control-C cancels. The other options apply once the disk has grown.

A machine from a spec file changes only while it runs. Then only its clipboard, shortcuts, shares, forwards and --keep-awake change, and on the OSMates engine its mute, microphone and camera. A clone made with --preset agent-sandbox takes no clipboard and no share.

Each setting in the app: https://osmates.com/docs/settings

Examples

sh
osmates vm set dev --cpus 8 --memory 16G
osmates vm set dev --share code=$HOME/src --forward 8080:80
osmates vm set dev --clipboard off

Arguments

<machine>Required

The machine's name or identifier.

--clipboard <clipboard>

How the clipboard meets the Mac's: off, to-guest, to-mac or both.

to-guest gives the guest the Mac's content on Edit > Paste in the machine's window. to-mac gives the Mac what changes in the guest while its window is in front. Linux shares plain text only.

One of off, to-guest, to-mac, both.

--shortcuts <shortcuts>

How Command reaches a Windows or Linux guest: mac or pc.

mac, which new machines have, makes Command-C Ctrl+C, Command-Tab Alt+Tab and Command-Space the Windows or Super key. pc makes Command the Windows or Super key. An agent's keys go as named either way. macOS machines get the Mac's keys as they are.

One of mac, pc.

--share <name=folder>Repeatable

A share's name and its folder on the Mac.

Windows shows it on its share drive, such as Z:\name. Linux and macOS show it in /mnt/osmates/name and /Volumes/osmates/name once the guest agent mounts it. A share of the same name is replaced, which is how --read-only goes on or off for one.

--read-only

The guest only reads the shares this command gives.

--no-events

The Mac's changes to the shares this command gives don't reach the guest's file watchers.

--unshare <name>Repeatable

The name of a share to take away.

--forward <mac-port[:[guest-address:]guest-port][/udp]>Repeatable

A port of the Mac's 127.0.0.1 and ::1 to forward to the guest.

Each connection goes through the guest agent to the guest's localhost, or to an address the guest has, as in 9000:[::1]:9000. Other forms: 8080, 8080:80 and 15353:53/udp. A new forward of a forwarded port replaces its target. Mac ports below 1024 are refused, as only root binds them. A Mac program that starts later on the same port loses its localhost clients to the forward. Clones and osmates run get no forwards.

--unforward <mac-port[/udp]>Repeatable

A forward to remove, such as 8080 or 15353/udp.

--cpus <cpus>

The number of processors.

At most the Mac's processors and the engine's limit, at least the system's minimum.

--memory <memory>

The memory, such as 8G or 6144M.

At most what the Mac and the engine allow, at least the system's minimum.

--network <network>

nat, shared:<name> or host-only:<name>.

Machines on a shared network reach each other, this Mac and the internet. On a host-only network, they reach each other and this Mac only. A name is one kind, and a name another machine uses with the other kind is refused. The machine keeps its MAC address. When osmatesd restarts, machines on either kind lose their connection for a few seconds and get new addresses.

--address <address>

A fixed address on the shared or host-only network --network names, at each start.

The first fixed address on a network sets its subnet, the address's /24, and the others must be in it. Use a private /24 this Mac doesn't reach already, as through Wi-Fi or a VPN. Another machine's address is refused, and so is any new address while other machines run on the network. --network without --address takes the fixed address away. Clones get an address of their own.

--processor-name <name>

The processor name a guest on the OSMates engine sees, from its next start.

Windows shows it as the processor's name. The maker, speed and ID stay as they were when the machine was made.

--disk <disk>

The disk's new size, such as 96G.

A disk never shrinks, and the same size asks the guest to grow into it again. The guest grows its system volume at its next start, which osmates vm info shows. A macOS machine's recovery container moves to the disk's new end first. A snapshot keeps its own size, which a revert to it or a clone of it gives back.

--record <off|on|video|trajectory>

Record agents' sessions: off, on, video or trajectory.

on keeps each session for 14 days, outside Time Machine: the screenshots the agent got, a screen after each of its steps, the accessibility trees it read, its programs' output and the egress log's lines. video adds an HEVC video of the display while the agent holds the machine, without sound. trajectory adds every input the agent sends, timed on the video, and a tree after each step that changes the screen. It applies at once, to a session already going from its next call. Clones keep it, and the agent-sandbox preset turns it on. Agents can't change it or read recordings through OSMates. osmates recordings lists, shows and exports them.

One of off, on, video, trajectory.

--mute

Mute the machine on the Mac; --no-mute plays its sound.

Muted, the guest still plays. macOS machines and machines on the OSMates engine have sound. On Apple Virtualization, a Linux machine has it only as debian-13-desktop or omarchy, or a clone of one. On the OSMates engine it applies at once, on Apple Virtualization from the next start. Machines that agents make or clone, and throwaway runs, start muted.

--no-mute

Mute the machine on the Mac; --no-mute plays its sound.

Muted, the guest still plays. macOS machines and machines on the OSMates engine have sound. On Apple Virtualization, a Linux machine has it only as debian-13-desktop or omarchy, or a clone of one. On the OSMates engine it applies at once, on Apple Virtualization from the next start. Machines that agents make or clone, and throwaway runs, start muted.

--microphone

Whether the guest hears the Mac's microphone. It's off on new machines and clones.

macOS asks once for access to the microphone. On the OSMates engine it applies at once, and the guest hears it only while it records and no agent drives the machine. On Apple Virtualization it applies from the next start, on the Mac's default input. No agent drives the machine while its run hears the microphone, and a run that starts during an agent's session records silence.

--no-microphone

Whether the guest hears the Mac's microphone. It's off on new machines and clones.

macOS asks once for access to the microphone. On the OSMates engine it applies at once, and the guest hears it only while it records and no agent drives the machine. On Apple Virtualization it applies from the next start, on the Mac's default input. No agent drives the machine while its run hears the microphone, and a run that starts during an agent's session records silence.

--camera

A USB camera in a Windows or Linux guest on the OSMates engine that shows the Mac's camera, at once.

It's off on new machines and clones. macOS asks once for access to the camera, and the camera light is on while the guest streams. While an agent drives the machine, the guest sees black. Agents can't change it.

--no-camera

A USB camera in a Windows or Linux guest on the OSMates engine that shows the Mac's camera, at once.

It's off on new machines and clones. macOS asks once for access to the camera, and the camera light is on while the guest streams. While an agent drives the machine, the guest sees black. Agents can't change it.

--camera-device <camera>

The Mac's camera by its name, such as "FaceTime HD Camera", or unique ID, or default for the one macOS prefers.

--keep-awake

Keep the Mac from sleeping on its own while the machine starts, runs or stops, on either engine.

Closing a laptop's lid, choosing Sleep and a low battery still sleep the Mac. The machine pauses then and continues when the Mac wakes. The display still turns off. It's off on new machines. Clones and osmates run keep it; machines that agents make or clone don't.

--no-keep-awake

Keep the Mac from sleeping on its own while the machine starts, runs or stops, on either engine.

Closing a laptop's lid, choosing Sleep and a low battery still sleep the Mac. The machine pauses then and continues when the Mac wakes. The display still turns off. It's off on new machines. Clones and osmates run keep it; machines that agents make or clone don't.

--start-at-login

Start the machine without a window when you log in to the Mac, or resume it when it was suspended.

After the Mac restarts, it starts once someone logs in. With FileVault on, macOS can't log in by itself, so after a power loss the Mac waits at its login screen. Machines start one at a time, by name. OSMates notifies you of one that doesn't start: one that would leave the Mac under 4 GiB of memory, a third macOS machine, or one that failed to start twice. Clones don't keep it. Temporary machines and machines a program owns can't have it.

--no-start-at-login

Start the machine without a window when you log in to the Mac, or resume it when it was suspended.

After the Mac restarts, it starts once someone logs in. With FileVault on, macOS can't log in by itself, so after a power loss the Mac waits at its login screen. Machines start one at a time, by name. OSMates notifies you of one that doesn't start: one that would leave the Mac under 4 GiB of memory, a third macOS machine, or one that failed to start twice. Clones don't keep it. Temporary machines and machines a program owns can't have it.

--watchdog

Restart the machine when its guest agent doesn't answer for 3 minutes, at most 3 times an hour.

The minutes count while the machine runs and the Mac is awake, and not in a run whose guest agent never answered. OSMates shuts the machine down as osmates vm stop does, then starts it again, and osmates vm events shows each restart. After 3 restarts within an hour, also across a restart of OSMates, the machine stays stopped and OSMates notifies you. Clones don't keep it. Temporary machines can't have it.

--no-watchdog

Restart the machine when its guest agent doesn't answer for 3 minutes, at most 3 times an hour.

The minutes count while the machine runs and the Mac is awake, and not in a run whose guest agent never answered. OSMates shuts the machine down as osmates vm stop does, then starts it again, and osmates vm events shows each restart. After 3 restarts within an hour, also across a restart of OSMates, the machine stays stopped and OSMates notifies you. Clones don't keep it. Temporary machines can't have it.

--rosetta

Run x86_64 Linux programs with Rosetta, from the machine's next start.

--no-rosetta

Run x86_64 Linux programs with Rosetta, from the machine's next start.

--3d

Draw a Linux machine's display with the Mac's GPU, OpenGL ES 3.0, from its next start.

--no-3d goes back to the engine's 2D display. A machine with 3D can't be suspended or keep its memory in a snapshot. debian-13-desktop and omarchy machines have it from their creation.

--no-3d

Draw a Linux machine's display with the Mac's GPU, OpenGL ES 3.0, from its next start.

--no-3d goes back to the engine's 2D display. A machine with 3D can't be suspended or keep its memory in a snapshot. debian-13-desktop and omarchy machines have it from their creation.

--secure-boot

A Linux machine's Secure Boot with Apple's default keys, from its next start.

The keys are Microsoft's UEFI CAs, which sign the shims of Debian, Ubuntu, Fedora and most distributions. The firmware then starts only a signed boot loader, and most distributions load only signed kernel modules. --no-secure-boot turns it off and keeps the keys. Clones keep it.

--no-secure-boot

A Linux machine's Secure Boot with Apple's default keys, from its next start.

The keys are Microsoft's UEFI CAs, which sign the shims of Debian, Ubuntu, Fedora and most distributions. The firmware then starts only a signed boot loader, and most distributions load only signed kernel modules. --no-secure-boot turns it off and keeps the keys. Clones keep it.

--security-key

A FIDO2 security key in a Windows or Linux guest on the OSMates engine, from its next start.

Each time a site uses it, the machine's window asks you, and Touch ID or your Mac's password confirms it. Agents can't. Its passkeys stay in this machine on this Mac. --no-security-key takes it away and erases them. Clones start without one.

--no-security-key

A FIDO2 security key in a Windows or Linux guest on the OSMates engine, from its next start.

Each time a site uses it, the machine's window asks you, and Touch ID or your Mac's password confirms it. Agents can't. Its passkeys stay in this machine on this Mac. --no-security-key takes it away and erases them. Clones start without one.

--displays <count>

The displays of a machine on the OSMates engine, 1 to 4, from its next start.

Linux draws each in a window of its own. The Windows display driver draws only the first, and with more than one, that display loses its EDID modes, 120 Hz among them.

--nested-virtualization

Let a Windows or Linux machine run its own hypervisor, such as WSL2, Hyper-V or KVM, from its next start.

It needs a Mac with an M3 chip or later, and it's off on new machines. A snapshot with memory keeps it, and a revert to one puts it back.

--no-nested-virtualization

Let a Windows or Linux machine run its own hypervisor, such as WSL2, Hyper-V or KVM, from its next start.

It needs a Mac with an M3 chip or later, and it's off on new machines. A snapshot with memory keeps it, and a revert to one puts it back.

--hdr

An HDR display from the machine's next start, on the OSMates engine or for a Linux machine with --3d.

Its EDID says HDR10, and a 3D scanout of 16-bit floating point shows in EDR, tone mapped to the Mac's screen. No Windows or Linux display driver draws HDR yet, so the guest stays SDR. It's off on new machines.

--no-hdr

An HDR display from the machine's next start, on the OSMates engine or for a Linux machine with --3d.

Its EDID says HDR10, and a 3D scanout of 16-bit floating point shows in EDR, tone mapped to the Mac's screen. No Windows or Linux display driver draws HDR yet, so the guest stays SDR. It's off on new machines.

--json

Print machine-readable JSON.

JSON output

With --json, it prints an object with these fields.

JSON Schema: /schemas/0/cli/vm/set.json

accessobject
access.foldersarray of objectsRequired
access.isCreatorbooleanRequired
access.machinestring (uuid)Required
access.needsConfirmationbooleanRequired
access.scopesarray of stringsRequired

Each item is one of observe, input, exec_user, exec_admin, guest_files, host_transfer, snapshots, lifecycle, network, usb.

access.untilstring (date-time)
activityobject
activity.elapsedintegerRequired
activity.guestBusynumberRequired
activity.guestCPUsintegerRequired
activity.macCPUnumberRequired
activity.wattsnumber
agentobject
agent.displayobject
agent.guestobject
agent.identityobject
agent.layoutOnThisMacboolean
agent.localeobject
agent.problemstring
agent.readinessobject
agent.sessionobject
agent.truststring or object

One of trusted, awaitingApproval, removed, or an object that holds one key: unavailable.

agent.updateobject

Holds one key: updating or failed.

agentNeverAnsweredbooleanRequired
basicDisplaystring

One of startedWithoutGPU, fellBack.

bundlestring
cameraobject
camera.accessstring

One of undetermined, granted, denied.

camera.devicestring
camera.framesintegerRequired

At least 0.

camera.settingsobjectRequired
camera.statestringRequired

One of off, idle, asking, denied, live, heldForAgent, unavailable.

camera.streamobject
clipboardobject
clipboard.channelstring or objectRequired

One of off, connecting, waitingForSignIn, or an object that holds one key: ready, locked, unavailable, copying or failed.

clipboard.lastCarryobject
clipboard.sharingstringRequired

One of off, to-guest, to-mac, both.

compactionstring
configurationobject
configuration.acceleratedGraphicsboolean
configuration.accountobjectRequired
configuration.cameraobject
configuration.clipboardstringRequired

One of off, to-guest, to-mac, both.

configuration.cpuCountintegerRequired
configuration.createdAtstring (date-time)Required
configuration.creatorstring
configuration.credentialsarray of objects
configuration.dataDisksarray of objects
configuration.discstring (uri)
configuration.diskBusstring

One of nvme.

configuration.diskSizeintegerRequired

At least 0.

configuration.displayobject
configuration.displayCountinteger
configuration.egressobject
configuration.enginestringRequired

One of virtualization, hypervisor.

configuration.firmwareobject
configuration.firstAgentAnswerstring (date-time)
configuration.forwardsarray of objects
configuration.highDynamicRangeboolean
configuration.idstring (uuid)Required
configuration.importedobject
configuration.isEphemeralbooleanRequired
configuration.keepsMacAwakeboolean
configuration.lastBuildobject
configuration.macOSobject
configuration.memorySizeintegerRequired

At least 0.

configuration.namestringRequired
configuration.nestedVirtualizationboolean
configuration.networkobject

Holds one key: nat or vmnet.

configuration.operatingSystemstringRequired

One of linux, macOS, windows, freeBSD.

configuration.originobject
configuration.ownedByRunboolean
configuration.ownerobject
configuration.partitionGrowthobject
configuration.presetstring

One of agent-sandbox.

configuration.processorobject
configuration.pulledFromobject
configuration.recordingstring

One of off, on, video, trajectory.

configuration.requirementsobject
configuration.rosettaboolean
configuration.secureBootboolean
configuration.securityKeyboolean
configuration.sharesarray of objectsRequired
configuration.shortcutsstring

One of mac, pc.

configuration.snapshotPolicyobjectRequired
configuration.soundobject
configuration.sourceobject
configuration.startsAtLoginboolean
configuration.templateSincestring (date-time)
configuration.usbDevicesarray of objects
configuration.watchdogboolean
configuration.windowsDriversobject
configuration.windowsDriversUndonestring
configuration.workspaceobject
controlobject
control.acquiredAtstring (date-time)Required
control.holderobjectRequired
control.lengthintegerRequired
control.machinestring (uuid)Required
control.pausedSincestring (date-time)
control.renewedAtstring (date-time)Required
credentialsarray of objects
credentials[].changedAtstring (date-time)Required
credentials[].createdAtstring (date-time)Required
credentials[].grantsarray of objectsRequired
credentials[].idstring (uuid)Required
credentials[].namestringRequired
credentials[].usesarray of objectsRequired
credentials[].variablestring
dataDisksarray of objects
dataDisks[].allocatedintegerRequired

At least 0.

dataDisks[].fromstringRequired
dataDisks[].numberintegerRequired
dataDisks[].sizeintegerRequired

At least 0.

discDrivesarray of objects
discDrives[].discstring (uri)
discDrives[].isRequiredboolean
diskobject
disk.allocatedintegerRequired

At least 0.

disk.layoutobject
disk.sizeintegerRequired

At least 0.

disk.volumeAvailableinteger

At least 0.

diskGrowthstring
displayobject
display.framestringRequired
display.heightintegerRequired
display.isResizingbooleanRequired
display.pointerobject
display.sourcestring

One of firmware, gpu.

display.undrawnstring
display.widthintegerRequired
egressobject
egress.allowedintegerRequired
egress.appliedstring

One of live, detached, detachedUntilRestart, atNextStart.

egress.lastRefusalobject
egress.pathstring

One of direct, filtered.

egress.pathFollowsPolicybooleanRequired
egress.policyobjectRequired
egress.refusedintegerRequired
egress.restartNeededbooleanRequired
egress.runstring

One of direct, filtered, detached.

egress.sharedNetworkstring
engineobject
engine.enginestringRequired

One of virtualization, hypervisor.

engine.hasarray of stringsRequired

Each item is one of battery, fiveMouseButtons, sound, memorySnapshots, rosetta, secureBoot, acceleratedGraphics, camera, securityKey, nestedVirtualization.

engine.lacksarray of stringsRequired

Each item is one of battery, fiveMouseButtons, sound, memorySnapshots, rosetta, secureBoot, acceleratedGraphics, camera, securityKey, nestedVirtualization.

firmwareOfferedstring
firmwareUpdatestring
fixedAddressstring (ipv4)
forwardsarray of objects
forwards[].connectionsintegerRequired
forwards[].droppedintegerRequired
forwards[].forwardobjectRequired
forwards[].statestring or objectRequired

One of listening, stopped, or an object that holds one key: unavailable.

guestDrawsNoHighDynamicRangeboolean
guestDrawsOneDisplayboolean
guestRequestsboolean
memoryobject
memory.budgetobjectRequired
memory.footprintintegerRequired

At least 0.

memory.isOverBudgetbooleanRequired
memory.peakintegerRequired

At least 0.

movestring
repositorySharesarray of strings
rosettaobject
rosetta.availabilitystringRequired

One of installed, notInstalled, notSupported.

rosetta.guestobject

Holds one key: registered or failed.

rosetta.inThisRunboolean
rosetta.onbooleanRequired
rosetta.savedboolean
sharesarray of objects
shares[].eventsOffstring
shares[].guestPathstring
shares[].problemstring
shares[].shareobjectRequired
shares[].unmountedstring
snapshotsarray of objectsRequired
snapshots[].createdAtstring (date-time)Required
snapshots[].discstring (uri)
snapshots[].discControllerboolean
snapshots[].firmwareobject
snapshots[].frameworkSoundobject
snapshots[].guestToolsboolean
snapshots[].hardwareobjectRequired
snapshots[].hostBuildstring
snapshots[].idstring (uuid)Required
snapshots[].includesMemorybooleanRequired
snapshots[].isCrashConsistentbooleanRequired
snapshots[].isKeptbooleanRequired
snapshots[].namestringRequired
snapshots[].networkPathstring

One of direct, detached, filtered.

snapshots[].originstring or objectRequired

One of manual, or an object that holds one key: agentSession, agent, beforeRevert, schedule, beforeUpdate, beforeDrivers, guest, beforeGuestRevert, codeSession, beforeMacOSUpdate or beforeFirmwareUpdate.

snapshots[].partitionGrowthobject
snapshots[].rosettaboolean
snapshots[].windowsDriversobject
snapshots[].withoutNetworkbooleanRequired
soundobject
sound.accessstring

One of undetermined, granted, denied.

sound.inputobject
sound.microphonestringRequired

One of off, idle, asking, denied, live, heldForAgent, unavailable, connected, untilStop, nextStart.

sound.missedServicesintegerRequired
sound.outputobject
sound.settingsobjectRequired
sound.thisRunobject
spaceobject
space.bundleobjectRequired
space.snapshotsarray of objectsRequired
statusobjectRequired
status.canSuspendbooleanRequired
status.controlobject
status.detailstring
status.displayobject
status.failureobject
status.idstring (uuid)Required
status.namestringRequired
status.pauseReasonstring or object

One of person, hostAsleep, or an object that holds one key: volumeFull, volumeLow or tpmStateUnsaved.

status.shutdownWaitobject
status.startWaitobject
status.statestringRequired

One of starting, running, paused, stopping, stopped, failed, suspended, offline.

status.suspensionobject
status.updatedAtstring (date-time)Required
status.workerBuildstring
status.workerProcessIdentifierinteger
volumestring

Fields nested deeper are in the schema.

Exit statuses

Its exit status is one of these.

StatusMeaning
0The command did what it was asked.
1The command failed; with --json, standard error's last line is the error object.
64The command line is wrong, as ArgumentParser found before the command ran.
65What was given is wrong, found while the command ran; the same command fails until it changes.
75The same command can work later with nothing changed, as while an update finishes.
130Control-C cancelled what the command started.

Report a problem with this page