Name

VMBeginRecording

Description

($err, $snapshotHandle) = VMBeginRecording($vmHandle, $name, $description,
					   $options, $propertyListHandle)

This function records a virtual machine's activity as a snapshot object.

Parameters

vmHandle
Identifies a virtual machine. Call VMOpen() to create a virtual machine handle.
name
A user-defined name for the recording; need not be unique.
description
A user-defined description for the recording.
options
Must be zero.
propertyListHandle
Must be VIX_INVALID_HANDLE.

Return Value

$err. The error code returned by the operation. For returned values, see Topics > Error Codes.

$snapshotHandle. The handle to the snapshot object.

Remarks

Side Effects

Requirements

use VMware::Vix::Simple;
use VMware::Vix::API::Constants;
since VMware Workstation 6.5

Example

my $err;
my $snapshotHandle;
my $vmHandle;

($err, $snapshotHandle) = VMBeginRecording($vmHandle, "recording 2",
                                           "description of recording 2",
	                                   0, VIX_INVALID_HANDLE);
die "VMBeginRecording() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

# wait for some activity to happen, then stop recording
$err = VMEndRecording($vmHandle, 0, VIX_INVALID_HANDLE);
die "VMEndRecording() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;


Copyright (C) 2007-2010 VMware, Inc. All rights reserved.