Request an invite
Docs menu

osmates vm restart

Shut a library machine down and start it again, with its window and network choice.

Usage
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>Required

The machine's name or identifier.

--json

Print machine-readable JSON.

JSON output

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

JSON Schema: /schemas/0/cli/vm/restart.json

canSuspendbooleanRequired
controlobject
control.holderstringRequired
control.isPausedbooleanRequired
control.namestringRequired
detailstring
displayobject
display.heightintegerRequired
display.pixelsPerInchinteger
display.scaleintegerRequired
display.widthintegerRequired
failureobject
failure.actionsarray of objectsRequired
failure.codestring
failure.kindstringRequired

One of failed, temporary, wrongInput.

failure.messagestringRequired
idstring (uuid)Required
namestringRequired
pauseReasonstring or object

One of person, hostAsleep, or an object that holds one key: volumeFull, volumeLow or tpmStateUnsaved.

pauseReason.volumeFullobject
pauseReason.volumeLowobject
pauseReason.tpmStateUnsavedobject
shutdownWaitobject
shutdownWait.percentinteger
shutdownWait.sincestring (date-time)Required
shutdownWait.workstringRequired

One of shuttingDown, installingUpdates.

startWaitobject
startWait.limitstringRequired

One of macOS, edition.

startWait.placeintegerRequired
startWait.runningarray of stringsRequired
startWait.sincestring (date-time)Required
statestringRequired

One of starting, running, paused, stopping, stopped, failed, suspended, offline.

suspensionobject
suspension.bytesintegerRequired

At least 0.

suspension.discControllerboolean
suspension.flushedbooleanRequired
suspension.frameworkSoundobject
suspension.guestToolsboolean
suspension.hostBuildstring
suspension.networkPathstringRequired

One of direct, detached, filtered.

suspension.rosettaboolean
suspension.savedAtstring (date-time)Required
suspension.withoutNetworkbooleanRequired
updatedAtstring (date-time)Required
workerBuildstring
workerProcessIdentifierinteger

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