Virtual Machine Snapshot Revert To Snapshot Task

Virtual Machine Snapshot Revert To Snapshot Task

Change the execution state of the virtual machine to the state of this snapshot.

Required privileges: VirtualMachine.State.RevertToSnapshot

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/VirtualMachineSnapshot/{moId}/RevertToSnapshot_Task
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case VirtualMachineSnapshot/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.3.0 APIs.


Request Body
RevertToSnapshotRequestType of type(s) application/json
Required
{
    "host": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "suppressPowerOn": false
}
host
Optional

Reference to an instance of the HostSystem managed object.

boolean
suppressPowerOn
Optional

(optional) If set to true, the virtual machine will not be powered on regardless of the power state when the snapshot was created. Default to false.

Authentication
This operation uses the following authentication methods.
Responses
200

This method returns a Task object with which to monitor the operation.

Returns MoRefTask of type(s) application/json
This response body class contains all of the following: MoRefExtensibleManagedObject
{
    "_typeName": "string",
    "type": "string",
    "value": "string"
}

500

TaskInProgress: if the virtual machine is busy.

NotSupported: if the host product does not support snapshots.

InsufficientResourcesFault: if this operation would violate a resource usage policy.

InvalidPowerState: if the operation cannot be performed in the current power state of the virtual machine.

InvalidState: if the operation cannot be performed in the current state of the virtual machine. For example, the virtual machine's configuration is not available.

VmConfigFault: if a configuration issue prevents the power-on. Typically, a more specific fault, such as UnsupportedVmxLocation, is thrown.

FileFault: if there is a problem accessing the virtual machine on the filesystem.

Returns VimFault of type(s) application/json
This response body class contains all of the following: MethodFault
{
    "_typeName": "string",
    "faultCause": "MethodFault Object",
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ]
}