osmates vm suspend
Save a running machine's memory and devices to its bundle and turn it off.
osmates vm suspend <machine> [--json]vm start resumes it where it was, also after the Mac restarts, and vm stop --discard throws the memory away. The guest agent writes the guest's cached data to its disks first when it answers. It needs the machine's memory and 1 GiB more free on the Mac. Quitting the machine's window from the Dock, or logging out of the Mac, suspends it too. A temporary machine, one still starting, one paused because its volume is full, and a Linux machine whose guest has no driver for its USB controller cannot be suspended.
Arguments
<machine>RequiredThe machine's identifier or name.
--jsonPrint machine-readable JSON.
JSON output
With --json, it prints an object with these fields.
JSON Schema: /schemas/0/cli/vm/suspend.json
canSuspendbooleanRequiredcontrolobjectcontrol.holderstringRequiredcontrol.isPausedbooleanRequiredcontrol.namestringRequireddetailstringdisplayobjectdisplay.heightintegerRequireddisplay.pixelsPerInchintegerdisplay.scaleintegerRequireddisplay.widthintegerRequiredfailureobjectfailure.actionsarray of objectsRequiredfailure.codestringfailure.kindstringRequiredOne of
failed,temporary,wrongInput.failure.messagestringRequiredidstring (uuid)RequirednamestringRequiredpauseReasonstring or objectOne of
person,hostAsleep, or an object that holds one key:volumeFull,volumeLowortpmStateUnsaved.pauseReason.volumeFullobjectpauseReason.volumeLowobjectpauseReason.tpmStateUnsavedobjectshutdownWaitobjectshutdownWait.percentintegershutdownWait.sincestring (date-time)RequiredshutdownWait.workstringRequiredOne of
shuttingDown,installingUpdates.startWaitobjectstartWait.limitstringRequiredOne of
macOS,edition.startWait.placeintegerRequiredstartWait.runningarray of stringsRequiredstartWait.sincestring (date-time)RequiredstatestringRequiredOne of
starting,running,paused,stopping,stopped,failed,suspended,offline.suspensionobjectsuspension.bytesintegerRequiredAt least 0.
suspension.discControllerbooleansuspension.flushedbooleanRequiredsuspension.frameworkSoundobjectsuspension.guestToolsbooleansuspension.hostBuildstringsuspension.networkPathstringRequiredOne of
direct,detached,filtered.suspension.rosettabooleansuspension.savedAtstring (date-time)Requiredsuspension.withoutNetworkbooleanRequiredupdatedAtstring (date-time)RequiredworkerBuildstringworkerProcessIdentifierinteger
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. |