osmates vm create
Create a machine from an image.
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, on a Mac with macOS 27 or later, it needs --password-stdin too, as a Linux desktop does. A Linux server takes one if you give it.
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
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
printf '%s\n' "$PASSWORD" | osmates vm create desk --image debian-13-desktop --password-stdinArguments
<name>RequiredThe 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.
--3dLinux with a display: draw with the Mac's GPU, OpenGL ES 3.0. Default: on for debian-13-desktop, omarchy and fedora-44-workstation-iso.
A machine with 3D can't be suspended or keep its memory in a snapshot.
--no-3dLinux with a display: draw with the Mac's GPU, OpenGL ES 3.0. Default: on for debian-13-desktop, omarchy and fedora-44-workstation-iso.
A machine with 3D can't be suspended or keep its memory in a snapshot.
--secure-bootLinux: 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-bootLinux: 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 machine's engine: hypervisor for the OSMates engine, or virtualization for Apple Virtualization. Default: hypervisor for a desktop or an ISO you install, virtualization otherwise.
The OSMates engine has 3D acceleration on every macOS OSMates runs on, sound, a camera, a security key, up to 4 displays and the Mac's battery. Apple Virtualization has Rosetta, and 3D acceleration and Secure Boot from macOS 27.
osmates vm imagesnames each image's engines;osmates vm infonames a machine's.One of
virtualization,hypervisor.--user <user>The guest account's name. Default: your user name.
--ssh-key <ssh-key>RepeatableA 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, or any on a Mac 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, and you install in the machine's window. It copies the ISO only for Apple Virtualization, when the ISO is on another volume than the machine: the copy takes the ISO's size until you eject it.
--password-stdinRead the account's password from standard input: Windows, Linux desktops and macOS 27 on a Mac with macOS 27 need one.
OSMates keeps a macOS or Windows password in your Keychain, to sign in. A Linux password is hashed on this Mac for the guest and never kept. It signs in at the guest's screen and console; SSH takes keys only.
--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-stdinWindows: 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-loginmacOS: 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-licensemacos-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 testthroughosmates 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>RepeatableA 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 volumeslists them.--resumeGo on with the interrupted creation of this name; with --iso, --ipsw or --image <path> when osmatesd needs the file again.
--jsonPrint machine-readable JSON.
JSON output
With --json, it prints an object with these fields.
JSON Schema: /schemas/0/cli/vm/create.json
acceleratedGraphicsbooleanaccountobjectRequiredaccount.authorizedKeysarray of stringsRequiredaccount.enablesRemoteLoginbooleanRequiredaccount.hasPasswordbooleanaccount.userstringRequiredcameraobjectcamera.devicestringcamera.onbooleanRequiredclipboardstringRequiredOne of
off,to-guest,to-mac,both.cpuCountintegerRequiredcreatedAtstring (date-time)Requiredcreatorstringcredentialsarray of objectscredentials[].credentialstring (uuid)Requiredcredentials[].endedobjectcredentials[].expiryobject or stringRequiredOne of
machineStop,never, or an object that holds one key:at.credentials[].grantedAtstring (date-time)Requiredcredentials[].includesClonesbooleanRequiredcredentials[].placeholderstringRequireddataDisksarray of objectsdataDisks[].filestringRequireddataDisks[].fromstringRequireddataDisks[].sizeintegerRequiredAt least 0.
discstring (uri)diskBusstringOne of
nvme.diskSizeintegerRequiredAt least 0.
displayobjectdisplay.heightintegerRequireddisplay.pixelsPerInchintegerdisplay.scaleintegerRequireddisplay.widthintegerRequireddisplayCountintegeregressobjectegress.modestringRequiredOne of
open,allowlist,blocked.egress.rulesarray of stringsRequiredenginestringRequiredOne of
virtualization,hypervisor.firmwareobjectfirmware.sha256stringRequiredfirmware.versionstringRequiredfirstAgentAnswerstring (date-time)forwardsarray of objectsforwards[].gueststringRequiredforwards[].guestPortintegerRequiredAt least 0.
forwards[].hostPortintegerRequiredAt least 0.
forwards[].transportstringRequiredOne of
tcp,udp.highDynamicRangebooleanidstring (uuid)Requiredimportedobjectimported.bitLockerbooleanRequiredimported.formatstringRequiredOne of
vmdkSparse,vmdkFlat,vmdkSplitSparse,vmdkSplitFlat,vmdkStream,vmdkVMFS,hddExpanding,hddPlain,qcow2,raw,asif.imported.fromstringRequiredimported.identitystringRequiredOne of
kept,new.imported.leftBehindarray of objects or stringsRequiredEach item is one of
firmwareVariables,guestTools,appSettings, or an object that holds one key:tpm,snapshots,savedStatesorotherDisks.imported.systemstringRequiredOne of
linux,macOS,windows,freeBSD.isEphemeralbooleanRequiredkeepsMacAwakebooleanlastBuildobjectlastBuild.enginestringlastBuild.signaturestringRequiredlastBuild.versionstringRequiredmacOSobjectmacOS.listedAtstring (date-time)macOS.offerobjectmacOS.reportedAtstring (date-time)RequiredmacOS.versionstringRequiredmacOS.wayBackobjectmemorySizeintegerRequiredAt least 0.
namestringRequirednestedVirtualizationbooleannetworkobjectHolds one key:
natorvmnet.network.natobjectnetwork.vmnetobjectoperatingSystemstringRequiredOne of
linux,macOS,windows,freeBSD.originobjectorigin.keptIdentifierbooleanorigin.machinestring (uuid)Requiredorigin.namestringRequiredorigin.sharesAccessbooleanorigin.snapshotstringorigin.templateSincestring (date-time)ownedByRunbooleanownerobjectowner.processIdentifierintegerRequiredowner.startedAtstring (date-time)RequiredpartitionGrowthobjectpartitionGrowth.diskSizeintegerRequiredAt least 0.
partitionGrowth.failuresintegerRequiredpartitionGrowth.problemstringpartitionGrowth.retriesbooleanRequiredpresetstringOne of
agent-sandbox.processorobjectprocessor.clockSpeedintegerRequiredAt least 0.
processor.manufacturerstringRequiredprocessor.midrintegerRequiredAt least 0.
processor.namestringRequiredpulledFromobjectpulledFrom.digeststringRequiredpulledFrom.publisherstringpulledFrom.pulledAtstring (date-time)RequiredpulledFrom.referencestringRequiredpulledFrom.signedBystringrecordingstringOne of
off,on,video,trajectory.requirementsobjectrequirements.cpuCountintegerRequiredrequirements.memorySizeintegerRequiredAt least 0.
rosettabooleansecureBootbooleansecurityKeybooleansharesarray of objectsRequiredshares[].eventsbooleanRequiredshares[].folderstring (uri)Requiredshares[].namestringRequiredshares[].readOnlybooleanRequiredshortcutsstringOne of
mac,pc.snapshotPolicyobjectRequiredsnapshotPolicy.beforeRevertingbooleanRequiredsnapshotPolicy.includesMemorybooleanRequiredsnapshotPolicy.keepintegerRequiredsnapshotPolicy.schedulestringRequiredOne of
never,hourly,daily.soundobjectsound.microphonebooleanRequiredsound.mutedbooleanRequiredsourceobjectsource.buildstringsource.digeststringsource.formatstringOne of
qcow2,raw,asif,xz.source.imagestringRequiredsource.installedOnstringsource.linuxLocaleobjectsource.locationstringsource.macOSLocaleobjectsource.versionstringsource.virtualSizeintegerAt least 0.
source.windowsobjectsource.xcodeobjectstartsAtLoginbooleantemplateSincestring (date-time)usbDevicesarray of objectsusbDevices[].namestringusbDevices[].productIDintegerRequiredAt least 0.
usbDevices[].serialstringusbDevices[].vendorIDintegerRequiredAt least 0.
watchdogbooleanwindowsDriversobjectwindowsDrivers.datestring (date-time)RequiredwindowsDrivers.namestringRequiredwindowsDrivers.resultsarray of objectsRequiredwindowsDrivers.setstringRequiredwindowsDrivers.snapshotstring (uuid)windowsDrivers.snapshotNamestringwindowsDriversUndonestringworkspaceobjectworkspace.bytesintegerRequiredAt least 0.
workspace.commitstringworkspace.filesintegerRequiredworkspace.folderstringRequiredworkspace.guestPathstringRequiredworkspace.historyLeftOutstringworkspace.hooksPathstringworkspace.idstring (uuid)Requiredworkspace.isGitWorkTreebooleanRequiredworkspace.lastDiffobjectworkspace.leftOutarray of objectsRequiredworkspace.objectFormatstringRequiredOne of
sha1,sha256.workspace.outstandingstringworkspace.pushedAtstring (date-time)Requiredworkspace.snapshotsBeforearray of strings (uuid)Required
Fields nested deeper are in the schema.
Exit statuses
Its exit status is one of these.
| Status | Meaning |
|---|---|
| 0 | The command did what it was asked. |
| 1 | The command failed; with --json, standard error's last line is the error object. |
| 64 | The command line is wrong, as ArgumentParser found before the command ran. |
| 65 | What was given is wrong, found while the command ran; the same command fails until it changes. |
| 75 | The same command can work later with nothing changed, as while an update finishes. |
| 130 | Control-C cancelled what the command started. |