IVMVirtualMachine::ShutdownActionOnQuit property
The ShutdownActionOnQuit property contains how to shut down this virtual machine (VM) if it is running when Virtual Server is quit.
This property is read/write.
Syntax
HRESULT put_ShutdownActionOnQuit(
[in] VMShutdownAction shutdownAction
);
HRESULT get_ShutdownActionOnQuit(
[out] VMShutdownAction *shutdownAction
);
VB |
---|
|
Property value
Contains a flag which specifies how to shut down this VM if it is running when Virtual Server is quit.
This property value is read/write.
Error codes
Name | Meaning |
---|---|
|
The operation was successful. |
|
shutdownAction is NULL. |
|
shutdownAction is not a valid value. |
|
The configuration is unknown. |
|
An unexpected error has occurred. |
Remarks
By default, running VMs are saved when Virtual Server is quit. The shutdown action vmShutdownAction_Save will save the VM's state. The vmShutdownAction_TurnOff action will turn off the VM. The vmShutdownAction_Shutdown action will shut down the guest operating system if the Virtual Server Additions are available and will fall back onto saving the VM otherwise.
Examples
The following example displays the ShutdownActionOnQuit 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 "Shutdown action on quit: " & objVM.ShutdownActionOnQuit
Requirements
Product |
Microsoft Virtual Server 2005 onWindows Server 2003 |
Download |
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003 |
Header |
|