Stone Equinox / Storage Spaces Direct (S2D) Hyper-V Cluster UPS Shutdown Script

Stone Equinox / Storage Spaces Direct (S2D) Hyper-V Cluster UPS Shutdown Script

Storage Spaces Direct (S2D) nodes provide disk resiliency to each other as part of the storage network.

When an extended power outage occurs that exceeds the available battery runtime, it is important that a managed shutdown process is used:

A software package is now available to provide this shutdown facility. It is compatible with all UPS software that supports shutdown via a script.

Latest version: v115 (23/6/2022)

See:

Script Installation Process

Pre-Requisites

A. Install your UPS Software as normal

Its a good idea to install your UPS Software first, as depending on the type of software installed, the software will be configured for you by the installation script.

B. Manual creation of a domain service account. Optional: If you do not follow this step to create a S2D Management domain account called svcUPs, the installation script will do it for you.

Installation on each S2D Host

Note: If Eaton Intelligent Power Protector (IPP), Eaton Intelligent Power Manager (IPM), APC Powerchute Network Shutdown, HPE Power Protector or Riello Powershield3 is running, the script will offer to configure the Eaton settings for you. See Configuring the UPS Software.

Verifying Installation

Check for a scheduled Task called UPShutdown in the \MANAGEMENT folder, in Task Scheduler

Configuring the UPS Software

Automatic Configuration

You should install your UPS software before running the UPS Shutdown script installer, as the script installer may be able to configure your software for you.

After installation, we recommend that manually check your UPS Software shutdown settings

Software Supported for Automatic Configuration

Manual Configuration / Verifying your UPS Software Shutdown settings

Reminder: You must configure the UPS software to use the shutdown script (for example C:\Program Files\Stone\HAS\S2D UPS Shutdown Script\StartShutdown.CMD) and a Shutdown Duration of at least 600 seconds

Testing the System

You should arrange full systems downtime to test the shutdown sequence. You can then test the software either from the UPS software, or by running StartShutdown.CMD from an Administrative command prompt

Recommended UPS Hardware Installation

Shutdown Settings

All of the settings in S2D_UPS_Settings.ini are shown below.

Concepts:


[Locations]
LogFilePath=C:\Program Files\Stone\HAS\S2D UPS Shutdown Script\Logs

[LocalVMSettings]
;maximum number of seconds to start shutting down all local VMs
MaximumTimetoStartShuttingdownLocalVMs=120
;maximum number of seconds in between starting each VM shutdown. Will be automatically reduced to shutdown within MaximumTimetoStartShuttingdownLocalVMs
LocalVMsStaggeredDelay=5
;Set this to False to Always Shut down local VMs, to Set to True to save VMs instead of shutting down, dependant upon each VMs memory demand and the OnlySaveLocalVMsBelowMemoryDemandThreshold setting
SaveLocalVMs=True
;Set this to False to Always Save local VMs, or set to True to only Save VMs that have a memory demand below the threshold. If set to True and the VM has a memory demand above the threshold, it will be shutdown instead of being saved
OnlySaveLocalVMsBelowMemoryDemandThreshold=True
SaveLocalVMsMemoryDemandThresholdMB=8192
;VMs with a memory demand above this threshold will be shutdown, instead of being saved

[ClusterSettings]
ShutdownCluster=True
OnlyInitiateClusterShutdownIfPoolOwner=False
;The amount of time in seconds before shutdown-cluster is issued
StartClusterShutdownDelay=120

[LocalNodePowerOff]
;Shutdown of this Node - in S2D, this needs to happen after all Cluster IO has ceased
TurnOffThisNode=True
;The settings below is the time in seconds, after Stage 2 has been started, that we will wait for the cluster shutdown job to complete before testing to see if we are ready to turn off the node
ClusterShutdownTimeout=240
;The settings below get the script to check every 5 seconds to see if these conditions have been met
DontTurnOffNodeifLocalClusteredVMsStillRunning=True
DontTurnOffNodeifLocalNonClusteredVMsStillRunning=True
DontTurnOffNodeifClusterIsStillRunning=True

[Misc]
Version=115

;Total Shutdown time should be:
;The greater of:
;MaximumTimetoStartShuttingdownLocalVMs + time to save or shutdown last VMs
;StartClusterShutdownDelay + ClusterShutdownTimeout
;Then a final optional checks for LocalClusteredVMs, LocalNon-ClusteredVMs, and then the Cluster itself
;Then issuing Local Host Shutdown
[Locations]
LogFilePath=C:\Program Files\Stone\HAS\S2D UPS Shutdown Script\Logs

[LocalVMSettings]
;maximum number of seconds to start shutting down all local VMs
MaximumTimetoStartShuttingdownLocalVMs=120
;maximum number of seconds in between starting each VM shutdown. Will be automatically reduced to shutdown within MaximumTimetoStartShuttingdownLocalVMs
LocalVMsStaggeredDelay=5
;Set this to False to Always Shut down local VMs, to Set to True to save VMs instead of shutting down, dependant upon each VMs memory demand and the OnlySaveLocalVMsBelowMemoryDemandThreshold setting
SaveLocalVMs=True
;Set this to False to Always Save local VMs, or set to True to only Save VMs that have a memory demand below the threshold. If set to True and the VM has a memory demand above the threshold, it will be shutdown instead of being saved
OnlySaveLocalVMsBelowMemoryDemandThreshold=True
SaveLocalVMsMemoryDemandThresholdMB=8192
;VMs with a memory demand above this threshold will be shutdown, instead of being saved

[ClusterSettings]
ShutdownCluster=True
OnlyInitiateClusterShutdownIfPoolOwner=False
;The amount of time in seconds before shutdown-cluster is issued
StartClusterShutdownDelay=120

[LocalNodePowerOff]
;Shutdown of this Node - in S2D, this needs to happen after all Cluster IO has ceased
TurnOffThisNode=True
;The settings below is the time in seconds, after Stage 2 has been started, that we will wait for the cluster shutdown job to complete before testing to see if we are ready to turn off the node
ClusterShutdownTimeout=240
;The settings below get the script to check every 5 seconds to see if these conditions have been met
DontTurnOffNodeifLocalClusteredVMsStillRunning=True
DontTurnOffNodeifLocalNonClusteredVMsStillRunning=True
DontTurnOffNodeifClusterIsStillRunning=True

[Misc]
Version=115

;Total Shutdown time should be:
;The greater of:
;MaximumTimetoStartShuttingdownLocalVMs + time to save or shutdown last VMs
;StartClusterShutdownDelay + ClusterShutdownTimeout
;Then a final optional checks for LocalClusteredVMs, LocalNon-ClusteredVMs, and then the Cluster itself
;Then issuing Local Host Shutdown

 

Applies to:



Article ID: 820
Last updated: 23 Jun, 2022
Revision: 31
Stone Branded Products -> Servers and Workstations -> Installation, Drivers and Software -> Stone Equinox / Storage Spaces Direct (S2D) Hyper-V Cluster UPS Shutdown Script
https://kb.stonegroup.co.uk/index.php?View=entry&EntryID=820