www.vmware.com
66
C API Reference Guide
RC1
VixVM_RevertToSnapshot
Function Signature
VixHandle
VixVM_RevertToSnapshot(VixHandle vmHandle,
VixHandle snapshotHandle,
unsigned int options,
VixHandle propertyListHandle,
VixEventProc *callbackProc,
void *clientData);
Parameters
Results
VixHandle — A job handle that describes the state of this asynchronous operation.
Notes
Restores the virtual machine to the state when the specified snapshot was created.
This may power a virtual machine on or off; the resulting power state reflects the
power state when the snapshot was created.
Example
This example restores the virtual machine to the state of the first root snapshot.
VixError err = VIX_OK;
VixHandle hostHandle = VIX_INVALID_HANDLE;
VixHandle jobHandle = VIX_INVALID_HANDLE;
VixHandle vmHandle = VIX_INVALID_HANDLE;
VixHandle snapshotHandle = VIX_INVALID_HANDLE;
int snapshotIndex;
vmHandle Identifies a virtual machine. Call VixVM_Open() to create a virtual
machine handle.
snapshotHandle A handle to a snapshot. Call VixVM_GetRootSnapshot() to get
a snapshot handle.
options Must be 0.
propertyListHandle Must be VIX_INVALID_HANDLE.
callbackProc A callback function that will be invoked when the power operation is
complete.
clientData A parameter that will be passed to the callbackProc function.