Request an invite
Docs menu

vm_revert

Revert a virtual machine to a snapshot.

Returns a machine to a snapshot, as a job. Everything the machine wrote since the snapshot is lost. A running machine is turned off without shutting down, so writes to shared folders it hadn't finished are lost too. A snapshot with memory resumes the machine where it was, with the processors, memory and display it had then. OSMates first snapshots the machine as it is, unless its policy says not to; the result names that snapshot.

Profiles
operator, full
Read-only
No
Destructive
Yes
Idempotent
No
Open world
No
Runs as a task
Optional

Parameters

snapshotstringRequired

The snapshot's name or identifier.

vmstringRequired

The machine's name or identifier, as vm_list shows it.

wait_secondsinteger

Seconds to wait before answering with a job to follow; default 20.

From 0 to 30.

Output

The result's structured content is one of these objects.

JSON Schema: /schemas/0/mcp/tools/vm_revert/output.json

running

jobstringRequired
statestringRequired

One of running.

reverted

jobstringRequired
notSavedBecausestring
savedBeforeobject
savedBefore.createdAtstring (date-time)Required
savedBefore.discstring (uri)
savedBefore.discControllerboolean
savedBefore.firmwareobject
savedBefore.frameworkSoundobject
savedBefore.guestToolsboolean
savedBefore.hardwareobjectRequired
savedBefore.hostBuildstring
savedBefore.idstring (uuid)Required
savedBefore.includesMemorybooleanRequired
savedBefore.isCrashConsistentbooleanRequired
savedBefore.isKeptbooleanRequired
savedBefore.namestringRequired
savedBefore.networkPathstring

One of direct, detached, filtered.

savedBefore.originstring or objectRequired

One of manual, or an object that holds one key: agentSession, agent, beforeRevert, schedule, beforeUpdate, beforeDrivers, guest, beforeGuestRevert, codeSession, beforeMacOSUpdate or beforeFirmwareUpdate.

savedBefore.partitionGrowthobject
savedBefore.rosettaboolean
savedBefore.windowsDriversobject
savedBefore.withoutNetworkbooleanRequired
statusobjectRequired
status.canSuspendbooleanRequired
status.controlobject
status.detailstring
status.displayobject
status.failureobject
status.idstring (uuid)Required
status.namestringRequired
status.pauseReasonstring or object

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

status.shutdownWaitobject
status.startWaitobject
status.statestringRequired

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

status.suspensionobject
status.updatedAtstring (date-time)Required
status.workerBuildstring
status.workerProcessIdentifierinteger

Fields nested deeper are in the schema.

Report a problem with this page