osmates snapshot create
Snapshot a machine's disk, and its memory with --memory.
osmates snapshot create <machine> [--name <name>] [--memory] [--json]A running machine pauses for the snapshot and then keeps running: for a fraction of a second, longer for a disk image in many pieces, which vm info reports and vm compact fixes, and about half a second more per GiB of memory in use with --memory.
Arguments
<machine>RequiredThe machine's name or identifier.
--name <name>A name for the snapshot. Default: the time.
--memoryAlso save the machine's memory, so that reverting resumes it where it was. It must be running or suspended.
--jsonPrint machine-readable JSON.
JSON output
With --json, it prints an object with these fields.
JSON Schema: /schemas/0/cli/snapshot/create.json
createdAtstring (date-time)Requireddiscstring (uri)discControllerbooleanfirmwareobjectfirmware.sha256stringRequiredfirmware.versionstringRequiredframeworkSoundobjectframeworkSound.playsbooleanRequiredframeworkSound.recordsbooleanRequiredframeworkSound.sourcebooleanguestToolsbooleanhardwareobjectRequiredhardware.cpuCountintegerRequiredhardware.diskSizeintegerRequiredAt least 0.
hardware.displayobjecthardware.memorySizeintegerRequiredAt least 0.
hardware.nestedVirtualizationbooleanhardware.processorobjecthostBuildstringidstring (uuid)RequiredincludesMemorybooleanRequiredisCrashConsistentbooleanRequiredisKeptbooleanRequirednamestringRequirednetworkPathstringOne of
direct,detached,filtered.originstring or objectRequiredOne of
manual, or an object that holds one key:agentSession,agent,beforeRevert,schedule,beforeUpdate,beforeDrivers,guest,beforeGuestRevert,codeSession,beforeMacOSUpdateorbeforeFirmwareUpdate.origin.agentSessionobjectorigin.agentobjectorigin.beforeRevertobjectorigin.scheduleobjectorigin.beforeUpdateobjectorigin.beforeDriversobjectorigin.guestobjectorigin.beforeGuestRevertobjectorigin.codeSessionobjectorigin.beforeMacOSUpdateobjectorigin.beforeFirmwareUpdateobjectpartitionGrowthobjectpartitionGrowth.diskSizeintegerRequiredAt least 0.
partitionGrowth.failuresintegerRequiredpartitionGrowth.problemstringpartitionGrowth.retriesbooleanRequiredrosettabooleanwindowsDriversobjectwindowsDrivers.datestring (date-time)RequiredwindowsDrivers.namestringRequiredwindowsDrivers.resultsarray of objectsRequiredwindowsDrivers.setstringRequiredwindowsDrivers.snapshotstring (uuid)windowsDrivers.snapshotNamestringwithoutNetworkbooleanRequired
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. |