Name
VMGetCurrentSnapshot
Description
($err, $snapshotHandle) = VMGetCurrentSnapshot($vmHandle);
This function returns the handle of the current active snapshot belonging to
the virtual machine referenced by
vmHandle.
Parameters
- vmHandle
-
Identifies a virtual machine. Call VMOpen() to create a virtual machine handle.
Return Value
$err. The error code returned by the operation. For returned values, see Topics > Error Codes.
$snapshotHandle. The handle to the snapshot.
Remarks
- This function returns the handle of the current active snapshot belonging to
the virtual machine referenced by vmHandle.
- The snapshotHandle returned by this function is reference counted.
The calling application is responsible for releasing the handle.
- This function is not supported when using the
VIX_SERVICEPROVIDER_VMWARE_PLAYER
host type.
Side Effects
None.
Requirements
use VMware::Vix::Simple;
use VMware::Vix::API::Constants;
since VMware Workstation 6.0
Example
my $err;
my $snapshotHandle;
($err, $snapshotHandle) = VMGetCurentSnapshot($vmHandle);
# remove/revert, otherwise use the snapshot