Name
VMGetNamedSnapshot
Description
($err, $snapshotHandle) = VMGetNamedSnapshot($vmHandle,
$name);
This
function
returns the handle of the snapshot matching the
given name in the virtual machine referenced by vmHandle.
Parameters
- vmHandle
-
Identifies a virtual machine. Call VMOpen() to create a virtual machine handle.
- name
-
Identifies a snapshot name.
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 a handle to the snapshot with matching name.
When the snapshot name is a duplicate, returns error 13017 VIX_E_SNAPSHOT_NONUNIQUE_NAME.
You can specify the snapshot name as a path, including snapshots in the tree above
the named snapshot, using '/' or '\\' as path separators, for example 'a/b/c' or 'x/x'.
- The snapshotHandle returned by this function is reference counted.
The calling application is responsible for releasing the handle.
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) = VMGetNamedSnapshot($vmHandle, "snapshot 3");
# remove/revert, otherwise use the snapshot