다음을 통해 공유


ShutdownAction

Defines the action performed on the virtual machine (VM) resource instance when actions outside the cluster (such as stopping the VM through the Hyper-V Manager or a shutdown of the operating system running in the VM) cause the VM to stop running. The following table summarizes the attributes of the ShutdownAction property.

Attribute Value
Data type DWORD
Access Read/write
Status Required
Structure CLUSPROP_DWORD
Minimum 0
Maximum 1
Default 0

Remarks

The following table summarizes the values for ShutdownAction.

Name Value Description
Offline resource
0 (Default)
The VM resource instance is taken offline.
Fail resource
1
The resource instance is marked as failed. The cluster service will respond to the failure based on the restart policy that is configured for the resource instance. Possible responses include attempting to restart the VM on the current node, failing over the VM to another node of the cluster, or leaving the resource instance in the failed state.

Examples

The property value portion of a property list entry for ShutdownAction can be set with the following example code.

DWORD          ShutdownActionData = 1;
CLUSPROP_DWORD ShutdownActionValue;

ShutdownActionValue.Syntax.dw = CLUSPROP_SYNTAX_LIST_VALUE_DWORD;
ShutdownActionValue.cbLength  = sizeof(DWORD);
ShutdownActionValue.dw        = ShutdownActionData;

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008 R2 Datacenter, Windows Server 2008 R2 Enterprise

See also

Virtual Machine Private Properties

CLUSPROP_DWORD