Configure maximum live migrations on Windows Server 2022 (cluster) / Azure Stack HCI

Just a very quick information. In case you are running a Windows Server 2022 based cluster (the same applies to Azure Stack HCI) and you wonder why it keeps reverting the per-host configuration of live-migrations (like if you set it using Set-VMHost), the reason is that this setting is nowadays managed through the Failover-Cluster (starting with the September 2022 update).

To adjust the setting, just use the following command:

(Get-Cluster).MaximumParallelMigrations = <Value>
configure max live-migrations

The setting will automatically be applied on the hosts.

# single host
Get-VMHost | ft MaximumVirtualMachineMigrations

# on all cluster nodes
icm -ScriptBlock { Get-VMHost } -ComputerName (Get-ClusterNode -Cluster <ClusterName>).Name | ft PSComputerName,MaximumVirtualMachineMigrations
get configured value