Request an invite
Docs menu

osmates vm create

Create a machine from an image.

Usage
osmates vm create [<options>] <name>

With no options, makes a Debian 13 machine. osmates vm images lists the other systems and their defaults.

Windows needs Microsoft's Windows 11 ISO for Arm in --iso, and a password from --password-stdin. macOS downloads Apple's newest restore image, tens of gigabytes, unless --ipsw names one. From macOS 27 on, it needs --password-stdin too.

Control-C deletes the unfinished machine and keeps the download. A creation that failed or stopped with osmatesd goes on with --resume, or goes with osmates vm delete.

Each system's options: https://osmates.com/docs/create-machine

Examples

sh
osmates vm create dev
osmates vm create web --image ubuntu-26.04 --memory 8G
printf '%s\n' "$PASSWORD" | osmates vm create win --image windows --iso Win11_Arm64.iso --password-stdin

Arguments

<name>Required

The machine's name: lowercase letters, digits and hyphens. It is also the guest's host name.

--image <image>

An image from osmates vm images, the path of an arm64 disk image, or its https URL with --checksum.

A disk image is qcow2, RAW, RAW in xz or ASIF.

Default: debian-13

--checksum <checksum>

With an https --image: sha256:<hex>, sha512:<hex>, a bare digest, or the https URL of a checksum file.

--user-data <user-data>

A cloud-init user-data file of at most 1 MiB, for a Linux cloud or disk image.

It applies at the first boot, with the user-data OSMates writes. A locale, time zone or keyboard it sets wins over the one OSMates sets.

--cpus <cpus>

The number of virtual CPUs. Default: the image's.

--memory <memory>

Memory, such as 4G or 512M. Default: the image's.

--disk <disk>

The root disk's size, such as 32G. Default: the image's.

--display <display>

A screen of this size, such as 1600x900, with a keyboard and pointer.

--scale <scale>

With --display: 1 to draw at 100%, or 2 at 200% in a window of half the points. Default: 1.

--3d

Linux with a display: draw with the Mac's GPU, OpenGL ES 3.0. Default: on for debian-13-desktop and omarchy.

A machine with 3D can't be suspended or keep its memory in a snapshot.

--no-3d

Linux with a display: draw with the Mac's GPU, OpenGL ES 3.0. Default: on for debian-13-desktop and omarchy.

A machine with 3D can't be suspended or keep its memory in a snapshot.

--secure-boot

Linux: Secure Boot with Apple's default keys. Default: on when the image's boot loader is signed under Microsoft's 2011 UEFI CA.

Debian's and Ubuntu's loaders are. Fedora 44's is signed under the 2023 CA alone. --secure-boot turns it on for any signed loader. The *-iso images take neither flag.

--no-secure-boot

Linux: Secure Boot with Apple's default keys. Default: on when the image's boot loader is signed under Microsoft's 2011 UEFI CA.

Debian's and Ubuntu's loaders are. Fedora 44's is signed under the 2023 CA alone. --secure-boot turns it on for any signed loader. The *-iso images take neither flag.

--engine <engine>

A Linux cloud image's engine: virtualization for Apple Virtualization, or hypervisor for the OSMates engine. Default: virtualization.

The OSMates engine adds the Mac's battery, the back and forward mouse buttons, and sound. It has no Rosetta or Secure Boot. osmates vm info shows a machine's engine.

One of virtualization, hypervisor.

--user <user>

The guest account's name. Default: your user name.

--ssh-key <ssh-key>Repeatable

A public key file to accept for SSH logins. Repeat for more.

--ipsw <ipsw>

macOS: a restore image (IPSW) file to install instead of the newest one.

One older than macOS 27 runs Setup Assistant in the machine's window, which asks for the account.

--iso <iso>

Windows: Microsoft's Windows 11 ISO for Arm. linux-iso: the arm64 ISO to install from.

OSMates checks a Windows ISO before it copies anything, and says why when it can't install from it. linux-iso puts the ISO in the DVD drive without copying it, and you install in the machine's window.

--password-stdin

macOS and Windows: read the account's password from standard input.

--edition <edition>

Windows: pro, home, home-single-language, pro-workstations, pro-education, education or enterprise. Default: pro.

The ISO decides which editions there are. Home needs your product key from --product-key-stdin. Pro for Workstations, Pro Education, Education and Enterprise install as Pro and upgrade at the first sign-in with Microsoft's setup key, which activates nothing.

--product-key-stdin

Windows: read your product key from standard input, on the line after the password with --password-stdin.

--language <language>

The guest's language. Default: this Mac's, or for Windows the ISO's.

macOS: languages, comma-separated, such as en-GB,fr, the first for the menus. Linux: one language, such as de. Windows: a display language the ISO holds, such as de-DE.

--region <region>

The guest's region. Default: this Mac's.

macOS and Linux: a region, such as GB, or a locale, such as en_GB. Windows: region formats, such as en-DE.

--keyboard <keyboard>

Keyboard layouts, comma-separated, the first in use. Default: this Mac's.

macOS: Apple's layouts, such as Dvorak or com.apple.keylayout.French. A macOS machine an agent makes gets U.S. alone. Linux: at most 4 xkeyboard-config layouts, such as fr or us(dvorak). Windows: keyboard IDs (0000040C), LANGID:KLID pairs or languages (fr).

--time-zone <time-zone>

An IANA time zone, such as Europe/London, or for Windows a Windows one, such as "W. Europe Standard Time". Default: this Mac's.

--remote-login

macOS: turn on Remote Login (SSH) for the account, for osmates ssh.

--xcode <xcode>

macos-xcode: the Xcode of this Mac to copy in. Default: /Applications/Xcode.app.

--agree-to-xcode-license

macos-xcode: you agree to the Xcode and Apple SDKs Agreement, which the machine's first launch of Xcode accepts.

macos-xcode copies in this Mac's Xcode, runs its first launch and downloads the iOS Simulator, for xcodebuild test through osmates run --desktop. It ends as a template, needs OSMates Pro and signs in to no Apple Account.

--clipboard <clipboard>

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

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

--egress <egress>

Network access from the first boot: open, allowlist or blocked. Default: open.

One of open, allowlist, blocked.

--allow <rule>Repeatable

A destination its allowlist allows; repeat for more.

--volume <volume>

The volume whose library the machine goes in, by name or UUID. Default: the startup volume.

Another APFS volume attached to this Mac. osmates vm volumes lists them.

--resume

Go on with the interrupted creation of this name; with --iso, --ipsw or --image <path> when osmatesd needs the file again.

--json

Print machine-readable JSON.

JSON output

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

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

acceleratedGraphicsboolean
accountobjectRequired
account.authorizedKeysarray of stringsRequired
account.enablesRemoteLoginbooleanRequired
account.userstringRequired
cameraobject
camera.devicestring
camera.onbooleanRequired
clipboardstringRequired

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

cpuCountintegerRequired
createdAtstring (date-time)Required
creatorstring
credentialsarray of objects
credentials[].credentialstring (uuid)Required
credentials[].endedobject
credentials[].expiryobject or stringRequired

One of machineStop, never, or an object that holds one key: at.

credentials[].grantedAtstring (date-time)Required
credentials[].includesClonesbooleanRequired
credentials[].placeholderstringRequired
dataDisksarray of objects
dataDisks[].filestringRequired
dataDisks[].fromstringRequired
dataDisks[].sizeintegerRequired

At least 0.

discstring (uri)
diskBusstring

One of nvme.

diskSizeintegerRequired

At least 0.

displayobject
display.heightintegerRequired
display.pixelsPerInchinteger
display.scaleintegerRequired
display.widthintegerRequired
displayCountinteger
egressobject
egress.modestringRequired

One of open, allowlist, blocked.

egress.rulesarray of stringsRequired
enginestringRequired

One of virtualization, hypervisor.

firmwareobject
firmware.sha256stringRequired
firmware.versionstringRequired
firstAgentAnswerstring (date-time)
forwardsarray of objects
forwards[].gueststringRequired
forwards[].guestPortintegerRequired

At least 0.

forwards[].hostPortintegerRequired

At least 0.

forwards[].transportstringRequired

One of tcp, udp.

highDynamicRangeboolean
idstring (uuid)Required
importedobject
imported.bitLockerbooleanRequired
imported.formatstringRequired

One of vmdkSparse, vmdkFlat, vmdkSplitSparse, vmdkSplitFlat, vmdkStream, vmdkVMFS, hddExpanding, hddPlain, qcow2, raw, asif.

imported.fromstringRequired
imported.identitystringRequired

One of kept, new.

imported.leftBehindarray of objects or stringsRequired

Each item is one of firmwareVariables, guestTools, appSettings, or an object that holds one key: tpm, snapshots, savedStates or otherDisks.

imported.systemstringRequired

One of linux, macOS, windows, freeBSD.

isEphemeralbooleanRequired
keepsMacAwakeboolean
lastBuildobject
lastBuild.enginestring
lastBuild.signaturestringRequired
lastBuild.versionstringRequired
macOSobject
macOS.listedAtstring (date-time)
macOS.offerobject
macOS.reportedAtstring (date-time)Required
macOS.versionstringRequired
macOS.wayBackobject
memorySizeintegerRequired

At least 0.

namestringRequired
nestedVirtualizationboolean
networkobject

Holds one key: nat or vmnet.

network.natobject
network.vmnetobject
operatingSystemstringRequired

One of linux, macOS, windows, freeBSD.

originobject
origin.keptIdentifierboolean
origin.machinestring (uuid)Required
origin.namestringRequired
origin.sharesAccessboolean
origin.snapshotstring
origin.templateSincestring (date-time)
ownedByRunboolean
ownerobject
owner.processIdentifierintegerRequired
owner.startedAtstring (date-time)Required
partitionGrowthobject
partitionGrowth.diskSizeintegerRequired

At least 0.

partitionGrowth.failuresintegerRequired
partitionGrowth.problemstring
partitionGrowth.retriesbooleanRequired
presetstring

One of agent-sandbox.

processorobject
processor.clockSpeedintegerRequired

At least 0.

processor.manufacturerstringRequired
processor.midrintegerRequired

At least 0.

processor.namestringRequired
pulledFromobject
pulledFrom.digeststringRequired
pulledFrom.publisherstring
pulledFrom.pulledAtstring (date-time)Required
pulledFrom.referencestringRequired
pulledFrom.signedBystring
recordingstring

One of off, on, video, trajectory.

requirementsobject
requirements.cpuCountintegerRequired
requirements.memorySizeintegerRequired

At least 0.

rosettaboolean
secureBootboolean
securityKeyboolean
sharesarray of objectsRequired
shares[].eventsbooleanRequired
shares[].folderstring (uri)Required
shares[].namestringRequired
shares[].readOnlybooleanRequired
shortcutsstring

One of mac, pc.

snapshotPolicyobjectRequired
snapshotPolicy.beforeRevertingbooleanRequired
snapshotPolicy.includesMemorybooleanRequired
snapshotPolicy.keepintegerRequired
snapshotPolicy.schedulestringRequired

One of never, hourly, daily.

soundobject
sound.microphonebooleanRequired
sound.mutedbooleanRequired
sourceobject
source.buildstring
source.digeststring
source.formatstring

One of qcow2, raw, asif, xz.

source.imagestringRequired
source.installedOnstring
source.linuxLocaleobject
source.locationstring
source.macOSLocaleobject
source.versionstring
source.virtualSizeinteger

At least 0.

source.windowsobject
source.xcodeobject
startsAtLoginboolean
templateSincestring (date-time)
usbDevicesarray of objects
usbDevices[].namestring
usbDevices[].productIDintegerRequired

At least 0.

usbDevices[].serialstring
usbDevices[].vendorIDintegerRequired

At least 0.

watchdogboolean
windowsDriversobject
windowsDrivers.datestring (date-time)Required
windowsDrivers.namestringRequired
windowsDrivers.resultsarray of objectsRequired
windowsDrivers.setstringRequired
windowsDrivers.snapshotstring (uuid)
windowsDrivers.snapshotNamestring
windowsDriversUndonestring
workspaceobject
workspace.bytesintegerRequired

At least 0.

workspace.commitstring
workspace.filesintegerRequired
workspace.folderstringRequired
workspace.guestPathstringRequired
workspace.historyLeftOutstring
workspace.hooksPathstring
workspace.idstring (uuid)Required
workspace.isGitWorkTreebooleanRequired
workspace.lastDiffobject
workspace.leftOutarray of objectsRequired
workspace.objectFormatstringRequired

One of sha1, sha256.

workspace.outstandingstring
workspace.pushedAtstring (date-time)Required
workspace.snapshotsBeforearray of strings (uuid)Required

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