Compartilhar via


IVMVirtualMachine::UndoAction property

The UndoAction property contains the default action to be performed on all undo drives when the virtual machine is shut down from within the guest operating system.

This property is read/write.

Syntax

HRESULT put_UndoAction(
  [in]  VMUndoAction undoAction
);

HRESULT get_UndoAction(
  [out] VMUndoAction *undoAction
);

VB
VMVirtualMachine.UndoAction( _
  ByRef undoAction, _
  ByVal undoAction _
)

Property value

The default action to be performed on all undo drives when the virtual machine is shut down from within the guest operating system.

This property value is read/write.

Error codes

Name Meaning
S_OK
The operation was successful.
E_POINTER
The undoAction parameter is NULL.
E_INVALIDARG
The undoAction parameter is not valid.
VM_E_VM_UNKNOWN
The configuration is unknown.
DISP_E_EXCEPTION
An unexpected error has occurred.

Remarks

See the VMUndoAction enumeration for descriptions of the allowable undoAction values.

Examples

The following example displays the UndoAction property value of a VMVirtualMachine object.

Set objVS = CreateObject("VirtualServer.Application")
Set objVM = objVS.FindVirtualMachine("Windows Server 2003")

WScript.Echo "VM Name: " & objVM.Name
WScript.Echo "Undo action: " & objVM.UndoAction

Requirements

Product
Microsoft Virtual Server 2005 onWindows Server 2003
Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h

See also

IVMVirtualMachine

VMUndoAction