Name
VMReset
Description
$err = VMReset($vmHandle,
$powerOnOptions);
This function resets a virtual machine.
Parameters
- vmHandle
-
Identifies a virtual machine. Call VMOpen() to create a virtual machine handle.
- powerOnOptions
-
Must be VIX_VMPOWEROP_NORMAL or VIX_VMPOWEROP_FROM_GUEST.
Return Value
$err. The error code returned by the operation. For returned values, see Topics > Error Codes.
Remarks
- If you pass VIX_VMPOWEROP_NORMAL as the options, this function is the
equivalent of pressing the reset button on a physical machine.
- The VIX_VMPOWEROP_FROM_GUEST flag will cause the function to try to reset
the guest OS. This will ensure a clean shutdown of the guest. This option
requires that the VMware Tools be installed and running in the guest.
- If the virtual machine is not powered on when you call this function, it returns
an error.
Side Effects
None.
Requirements
use VMware::Vix::Simple;
use VMware::Vix::API::Constants;
since VMware Server 1.0