osmates vm import
Import a Windows, Linux or macOS machine another Mac app made, from its folder or a disk file.
osmates vm import [<options>] [<path>]Converts the disks of a machine from another Mac app, and leaves the source unchanged. The boot disk tells the system: Windows 11 for Arm, Linux for Arm or macOS. --check says what comes in and what stays behind, and imports nothing.
Prepare a Windows machine first, or BitLocker asks for its recovery key. Save the disc with --preparation-disc, run Prepare for OSMates from it in the old app, and don't start the machine there again. Its TPM stays behind, with Windows Hello's PIN and passkeys.
Don't run a macOS machine in its old app while it runs here.
An interrupted import goes on with --resume and the path again, or goes with osmates vm delete.
Each app and system: https://osmates.com/docs/import-machine
Examples
osmates vm import ~/vms/win11 --check
osmates vm import ~/vms/win11 --name win11Arguments
<path>The machine's folder, or one of its disk files.
VMDK disks with a VMX file, .hdd folders, config.plist bundles with qcow2, RAW or ASIF disks, and folders with HardwareModel, MachineIdentifier, AuxiliaryStorage and Disk.img. A Linux boot disk has \EFI\BOOT\BOOTAA64.EFI. To set a Linux disk up anew with cloud-init, use
osmates vm create <name> --image <file>instead.--name <name>The machine's name. Default: the one in its settings, or its folder's.
--new-identityA new identity: a system UUID for Windows, a MAC address for Linux, a machine identifier for macOS.
Windows then checks its activation again, and iCloud in macOS asks for your Apple Account.
--system-uuid <system-uuid>Windows: the system UUID Prepare for OSMates printed.
Without it, Windows keeps the one in the VMX file or config.plist.
--user <user>Linux and macOS: the guest account. Default: the first one that signs in.
--without-other-disksLeave its other disks behind.
Without it, they come in as disk 2 and on.
--cpus <cpus>The number of virtual CPUs. Default: its settings, within this Mac's limits.
--memory <memory>Memory, such as 8G. Default: its settings, within this Mac's limits.
--password-stdinRead the Windows or macOS account's password from standard input, for
osmates vm sign-in.--checkRead the machine and say what comes in and what stays behind, without importing it.
--preparation-disc <preparation-disc>Save the OSMATES preparation disc to this file.
Attach it to the machine in its old app. Windows: run Prepare for OSMates from it. Linux: run osmates-install from it as root, there or once the machine runs here.
--resume <resume>Go on with the interrupted import of this name, from the path again.
--jsonPrint machine-readable JSON.
JSON output
With --json, it prints an object with these fields.
JSON Schema: /schemas/0/cli/vm/import.json
acceleratedGraphicsbooleanaccountobjectRequiredaccount.authorizedKeysarray of stringsRequiredaccount.enablesRemoteLoginbooleanRequiredaccount.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.
With --check
With --json and --check, it prints an object with these fields.
JSON Schema: /schemas/0/cli/vm/import.check.json
bootobjectHolds one key:
windows,linuxormacOS.boot.windowsobjectboot.linuxobjectboot.macOSobjectcpuCountintegerdiskobjectRequireddisk.controllerstringOne of
nvme,sata,scsi,ide,virtio.disk.estimateintegerRequiredAt least 0.
disk.filestringRequireddisk.formatstringRequiredOne of
vmdkSparse,vmdkFlat,vmdkSplitSparse,vmdkSplitFlat,vmdkStream,vmdkVMFS,hddExpanding,hddPlain,qcow2,raw,asif.disk.snapshotsBelowintegerRequireddisk.sparseOnlybooleanRequireddisk.virtualSizeintegerAt least 0.
layoutstringRequiredOne of
vmx,machinePlist,hddFolder,vmBundle,disk.leftBehindarray of objects or stringsRequiredEach item is one of
firmwareVariables,guestTools,appSettings, or an object that holds one key:tpm,snapshots,savedStatesorotherDisks.leftBehind[].tpmobjectleftBehind[].snapshotsobjectleftBehind[].savedStatesobjectleftBehind[].otherDisksobjectmacAddressstringmemorySizeintegerAt least 0.
otherDisksarray of objectsRequiredotherDisks[].controllerstringOne of
nvme,sata,scsi,ide,virtio.otherDisks[].estimateintegerRequiredAt least 0.
otherDisks[].filestringRequiredotherDisks[].formatstringRequiredOne of
vmdkSparse,vmdkFlat,vmdkSplitSparse,vmdkSplitFlat,vmdkStream,vmdkVMFS,hddExpanding,hddPlain,qcow2,raw,asif.otherDisks[].snapshotsBelowintegerRequiredotherDisks[].sparseOnlybooleanRequiredotherDisks[].virtualSizeintegerAt least 0.
platformDigeststringsavedStatesintegerRequiredsettingsEncryptedbooleanRequiredsourceNamestringRequiredsuggestedNamestringRequiredsystemstringRequiredOne of
linux,macOS,windows,freeBSD.systemUUIDstring (uuid)uuidOriginstringOne of
vmx,settingsPlist.
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. |