A SERVICE OF

logo

www.vmware.com
62
C API Reference Guide
RC1
VixVM_RemoveSnapshot
Function Signature
VixHandle
VixVM_RemoveSnapshot(VixHandle vmHandle,
VixHandle snapshotHandle,
unsigned int options,
VixEventProc *callbackProc,
void *clientData);
Parameters
Results
VixHandle — A job handle that describes the state of this asynchronous operation.
Notes
This function deletes all saved state for the specified snapshot.
A snapshot can only be removed while the associated virtual machine is
powered off.
This release of the C API can manage only a single snapshot for each virtual
machine. A virtual machine imported from another VMware product may have
more than one snapshot at the time it is imported. In that case, you can only
delete a snapshot subsequently added using the C API.
Example
This example deletes every root snapshot belonging to a virtual machine.
VixError err = VIX_OK;
VixHandle hostHandle = VIX_INVALID_HANDLE;
VixHandle jobHandle = VIX_INVALID_HANDLE;
VixHandle vmHandle = VIX_INVALID_HANDLE;
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.
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.