osmates vm update-macos
Save a running macOS machine, then install the macOS update Software Update offers it.
osmates vm update-macos <machine> [--list] [--update <update>] [--json]OSMates lists the updates with softwareupdate in the machine, saves the machine as a snapshot named "Before macOS <version>", and only then has macOS install the update of the machine's own major version, as the machine's account, with the password vm password keeps. If the snapshot cannot be taken, nothing is installed. macOS restarts the machine to install, which can take 30 minutes or more; this command follows it and says which version came back. To go back, revert to the snapshot it names. --list only lists. An upgrade to a new major version is named and left to System Settings in the machine. Control-C stops following; once softwareupdate runs, the install goes on in the machine.
Arguments
<machine>RequiredThe machine's name or identifier.
--listList what Software Update offers the machine and change nothing.
--update <update>The label of the update to install, as --list prints it.
--jsonPrint machine-readable JSON.
JSON output
With --json, it prints an object with these fields.
JSON Schema: /schemas/0/cli/vm/update-macos.json
accountstringitemsarray of objectsRequireditems[].isRecommendedbooleanRequireditems[].labelstringRequireditems[].restartsbooleanRequireditems[].sizeintegerAt least 0.
items[].titlestringRequireditems[].versionstringmachinestringRequiredoutcomeobject or stringOne of
unchanged,notRestarted,notBack,shutDown, or an object that holds one key:updated.outcome.updatedobjectsnapshotobjectsnapshot.createdAtstring (date-time)Requiredsnapshot.discstring (uri)snapshot.discControllerbooleansnapshot.firmwareobjectsnapshot.frameworkSoundobjectsnapshot.guestToolsbooleansnapshot.hardwareobjectRequiredsnapshot.hostBuildstringsnapshot.idstring (uuid)Requiredsnapshot.includesMemorybooleanRequiredsnapshot.isCrashConsistentbooleanRequiredsnapshot.isKeptbooleanRequiredsnapshot.namestringRequiredsnapshot.networkPathstringOne of
direct,detached,filtered.snapshot.originstring or objectRequiredOne of
manual, or an object that holds one key:agentSession,agent,beforeRevert,schedule,beforeUpdate,beforeDrivers,guest,beforeGuestRevert,codeSession,beforeMacOSUpdateorbeforeFirmwareUpdate.snapshot.partitionGrowthobjectsnapshot.rosettabooleansnapshot.windowsDriversobjectsnapshot.withoutNetworkbooleanRequiredupdateobjectupdate.isRecommendedbooleanRequiredupdate.labelstringRequiredupdate.restartsbooleanRequiredupdate.sizeintegerAt least 0.
update.titlestringRequiredupdate.versionstringupgradeobjectupgrade.isRecommendedbooleanRequiredupgrade.labelstringRequiredupgrade.restartsbooleanRequiredupgrade.sizeintegerAt least 0.
upgrade.titlestringRequiredupgrade.versionstringversionstringRequired
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. |