Name

VMPause

Description

$err = VMPause($vmHandle, $options, $propertyListHandle);

This function pauses a virtual machine. See Remarks section for pause behavior when used with different operations.

Parameters

vmHandle
Identifies a virtual machine. Call VMOpen() to create a virtual machine handle.
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.

Remarks

Side Effects

None.

Requirements

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

Example


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

# find the appropriate snapshot handle to replay

# start the replay with the UI open
$err = VMBeginReplay($vmHandle, $snapshotHandle, VIX_VMPOWEROP_LAUNCH_GUI, VIX_INVALID_HANDLE);
die "VMBeginReplay() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

# pause the replay
$err = VMPause($vmHandle, 0, VIX_INVALID_HANDLE);
die "VMPause() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

# do something

# unpause the replay
$err = VMUnpause($vmHandle, 0, VIX_INVALID_HANDLE);
die "VMUnpause() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;


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