osmates vm restart
Shut a library machine down and start it again, with its window and network choice.
osmates vm restart <machine> [--json]The guest shuts down as with vm stop, then the machine starts from its disk, which applies a network access that waits for a restart. A restart from inside the guest keeps the run as it is. A start, stop, suspend, revert or delete meanwhile cancels it. A machine from a spec file has none: stop it and start it again from its file.
Arguments
<machine>RequiredThe machine's name or identifier.
--jsonPrint machine-readable JSON.
JSON output
With --json, it prints an object with these fields.
JSON Schema: /schemas/0/cli/vm/restart.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. |