$err = VMBeginReplay($vmHandle, $snapshotHandle, $options,
This function replays a recording of a virtual machine.
Identifies a virtual machine. Call VMOpen() to create a virtual
snapshot handle that represents the recording.
Must be VIX_VMPOWEROP_NORMAL or VIX_VMPOWEROP_LAUNCH_GUI.
Must be VIX_INVALID_HANDLE.
$err. The error code returned by the operation. For returned values, see Topics > Error Codes.
- Record-replay functionality has been deprecated and this function may be removed from future versions of the VIX API.
- Use of this function with a non-recording snapshot returns
- To display playback of the recording with the Workstation user interface,
powerOnOptions must have the VIX_VMPOWEROP_LAUNCH_GUI flag. If there is an
existing instance of the Workstation user interface, the virtual machine will
power on in a new tab within that instance. Otherwise, a new instance of
Workstation will open, and the virtual machine will power on there.
- Guest commands are not allowed while the virtual machine is replaying a
- Once the recording has finished, the virtual machine will automatically "go live";
it will resume normal execution from the last state that is part of the recording.
- The property VIX_PROPERTY_SNAPSHOT_IS_REPLAYABLE can be used to determine if a
snapshot is a recording.
- This function is not supported when using the
since VMware Workstation 6.5
# 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;
# wait for some activity to happen, then stop replaying
$err = VMEndReplay($vmHandle, 0, VIX_INVALID_HANDLE);
die "VMEndReplay() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;