Revert VM Snapshot operation
The Revert VM Snapshot operation reverts the current virtual machine to a specified snapshot. If the {{<status>}} response element contains _success_, the {{<Task>}} response element contains the ID of the queued task, which you can use to obtain the task status.
The following table describes the elements for this request.
Adapter request elements for the Revert VM Snapshot operation
Element | Definition | Required |
---|---|---|
<operation-type> | Defines the type of operation: Advanced_Vm | Yes |
<operation-name> | Defines the name of operation: Revert_VM_Snapshot | Yes |
<soap-url> | Specifies the URL for the remote SOAP service running on the VMware VirtualCenter | No |
<transport> | Specifies the transport protocol for the message | No |
<user-name> | Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center | No |
<password> | Specifies the password corresponding to <user-name> | Conditional; required if <user-name> is specified |
<parameters> | Contains the elements required to execute the operation | Yes |
<virtual-machine> | Contains the name of the virtual machine on which this operation is to be executed | Yes |
<name> | Specifies the canonical path name for the snapshot | Yes |
The following code sample shows a sample adapter request for the Revert VM Snapshot operation.
Sample adapter request for the Revert VM Snapshot operation
<operation-type>Advanced_Vm</operation-type>
<operation-name>Revert_VM_Snapshot</operation-name>
<soap-url></soap-url>
<transport></transport>
<user-name></user-name>
<password></password>
<parameters>
<virtual-machine>win1</virtual-machine>
<name>win1SnapShot/sun1SnapShot/sun1SnapShot</name>
</parameters>
</vmware-infrastructure-request>
The following code sample shows the response for the sample Revert VM Snapshot operation.
Sample adapter response for the Revert VM Snapshot operation
<metadata>
<status>success</status>
</metadata>
<RevertToSnapshot_TaskResponse>
<Task>task-720</Task>
</RevertToSnapshot_TaskResponse>
</vmware-infrastructure-response>
The following code sample describes the response element.
Adapter response element for the Revert VM Snapshot operation
Element | Definition |
---|---|
<Task> | Specifies the task ID of the submitted task |