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.


Script Installation Process


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) or Eaton Intelligent Power Manager (IPM) 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:\_STONE\S2DUPSShutdown\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 ShutdownControl.txt / ShutdownControl.PS1 are shown below.


# Stage 1 - Shutting down Local VMs on this host Only
#         - a) Clustered VM roles on this node only
#         - b) Non-Clustered VM roles on this node
[int]$LocalVMsStaggeredDelay = 5 # maximum number of seconds in between starting each VM shutdown
[int]$MaximumTimetoStartShuttingdownLocalVMs = 120 # maximum number of seconds to start shutting down local VMs. $LocalVMsStaggeredDelay might be reduced if you have lots of VMs
[int]$SaveLocalVMs=$true # $true to save local VMs, or $false to shut them down

# if $SaveLocalVMs=$true
# VMs above this threshold will be shutdown, instead of being saved

# Stage 2 - Start shutting down the Global cluster
[int]$StartClusterShutdownDelay=120 # the amount of time before shutdown-cluster is issued
# The local UPS script on each node should have already started the shutdown the local VMs

# Stage 3 - Shutdown of this Node - in S2D, this needs to happen after all Cluster IO has ceased
$ClusterShutdownTimeout = 240 # this it 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 

# 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: 20 Oct, 2020
Revision: 25
Stone Branded Products -> Servers and Workstations -> Installation, Drivers and Software -> Stone Equinox / Storage Spaces Direct (S2D) Hyper-V Cluster UPS Shutdown Script