Skip to main content

Task 04: Cluster Operations

Implementation Day 2

DOCUMENT CATEGORY: Implementation Runbook
SCOPE: A running Azure Local cluster
PURPOSE: Read the health, capacity and alerts of the cluster, and make the changes of day 2 (maintenance mode, live migration, volume ownership) safely
MASTER REFERENCE: Suspend and resume Azure Local machines for maintenance

Status: Active

The script connects to the cluster (cluster.name) or to one node with PowerShell remoting and runs the cluster cmdlets there, so the machine that runs it needs no failover clustering tools. It signs in nowhere and asks nothing. HealthCheck, Capacity and Alerts only read; MaintenanceMode, LiveMigrate and Rebalance change the cluster, and each change is behind -WhatIf and -Confirm.


Values from infrastructure.yml​

The values for this task come from infrastructure.yml (schema 5). Every key, with its type, default and example, is in the variables reference.

KeyWhat the script does with it
cluster.nameThe cluster to connect to and to operate on
nodes[].name, nodes[].management.ip_address, identity.active_directory.domain_fqdn-NodeName is matched against them (a name, a fully qualified name or an address). A name that is not in the file is used as it is, with a warning (with -RequireNodeInFile the run stops with exit code 2)

Execution Options​

PowerShell on a cluster machine​

When to use: A single question, by hand

Get-ClusterNode; Get-StoragePool -IsPrimordial $false; Get-VirtualDisk; Get-StorageJob; Get-ClusterNetwork
Get-StorageSubSystem -FriendlyName "Clustered*" | Debug-StorageSubSystem # Health Service faults
Get-ClusterNode -Name "<MachineName>" | Get-ClusterGroup # the roles on a machine
Move-ClusterVirtualMachineRole -Name "<VirtualMachineRole>" -Node "<Target>" -MigrationType Live

Validation​

  • HealthCheck ends with exit code 0 and every row is Healthy
  • After MaintenanceMode -Enable: Get-ClusterNode shows the node Paused and Get-MocPhysicalNode no longer lists it
  • After MaintenanceMode (leave): the node is Up, listed again, and Get-StorageJob shows nothing before the next node is touched

Troubleshooting​

IssueCauseResolution
Not safe: ... on MaintenanceMode -EnableAnother node is not Up, a virtual disk is not healthy or a repair job is runningWait for the repair to finish (HealthCheck shows it), then run again. Nothing was changed
The node x does not have Remove-MocPhysicalNode, New-MocPhysicalNodeThe node runs a version before 2311.2Update first. The run stopped before the drain (or the resume); nothing was changed
The cluster has no node 'x'The name is not a node of the clusterCheck -NodeName against nodes[].name
LiveMigrate fails for one virtual machineThe virtual machine is not clustered, or the target lacks the memoryThe other virtual machines are still moved; the exit code is 1. Move that one by hand
Alerts returns an event of the last 24 hours that is already fixedThe log keeps the eventRead the time of the row; the exit code only clears when no event is left in the window

PreviousUpNext
Task 03: Node MaintenancePart 8 IndexImplementation Guide

Version Control​

VersionDateAuthorChanges
1.0.02026-11-15Azure Local CloudInitial release
1.0.12026-11-16Azure Local CloudMaintenanceMode checks the two Moc cmdlets before it drains or resumes; the Rebalance rule