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
-
Idenitfies a snapshot name.
Return Value
$err. The error code returned by the operation.
$snapshotHandle. The handle to the snapshot.
Remarks
- This function returns a handle to the snapshot with the matching name.
Since snapshot names are not unique, the first match is returned.
- 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) = VMGetNamedSnapshotHandle($vmHandle, "snapshot 3");
# remove/revert, otherwise use the snapshot
Copyright (C) 2007 VMware, Inc. All rights reserved.