Request an invite
Docs menu

osmates vm import

Import a Windows, Linux or macOS machine another Mac app made, from its folder or a disk file.

Usage
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

sh
osmates vm import ~/vms/win11 --check
osmates vm import ~/vms/win11 --name win11

Arguments

<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-identity

A 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-disks

Leave 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-stdin

Read the Windows or macOS account's password from standard input, for osmates vm sign-in.

--check

Read 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.

--json

Print machine-readable JSON.

JSON output

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

JSON Schema: /schemas/0/cli/vm/import.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.

With --check

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

JSON Schema: /schemas/0/cli/vm/import.check.json

bootobject

Holds one key: windows, linux or macOS.

boot.windowsobject
boot.linuxobject
boot.macOSobject
cpuCountinteger
diskobjectRequired
disk.controllerstring

One of nvme, sata, scsi, ide, virtio.

disk.estimateintegerRequired

At least 0.

disk.filestringRequired
disk.formatstringRequired

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

disk.snapshotsBelowintegerRequired
disk.sparseOnlybooleanRequired
disk.virtualSizeinteger

At least 0.

layoutstringRequired

One of vmx, machinePlist, hddFolder, vmBundle, disk.

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.

leftBehind[].tpmobject
leftBehind[].snapshotsobject
leftBehind[].savedStatesobject
leftBehind[].otherDisksobject
macAddressstring
memorySizeinteger

At least 0.

otherDisksarray of objectsRequired
otherDisks[].controllerstring

One of nvme, sata, scsi, ide, virtio.

otherDisks[].estimateintegerRequired

At least 0.

otherDisks[].filestringRequired
otherDisks[].formatstringRequired

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

otherDisks[].snapshotsBelowintegerRequired
otherDisks[].sparseOnlybooleanRequired
otherDisks[].virtualSizeinteger

At least 0.

platformDigeststring
savedStatesintegerRequired
settingsEncryptedbooleanRequired
sourceNamestringRequired
suggestedNamestringRequired
systemstringRequired

One of linux, macOS, windows, freeBSD.

systemUUIDstring (uuid)
uuidOriginstring

One of vmx, settingsPlist.

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