Posted On January 10, 2022

Get Hyper-V Cluster Automatic Balancing Configurations

kimconnect 0 comments
blog.KimConnect.com >> Virtualization >> Get Hyper-V Cluster Automatic Balancing Configurations
# getHyperVLoadBalanceMode.ps1

$clustername=(Get-Cluster).Name
function getHyperVLoadBalanceMode($clustername=(Get-Cluster).Name){

    $AutoBalancerLevel=[hashtable]@{
        '1'='Low | Move when host is more than 80% loaded (default)'
        '2'='Medium | Move when host is more than 70% loaded'
        '3'='High | Average nodes and move when host is more than 5% above average'
    }
    
    $AutoBalancerMode=[hashtable]@{
        '0'='Disabled'
        '1'='Load balance on node joins'
        '2'='Load balance on node joins and every 30 minutes (default)'
    }
    try{
        $level=(Get-Cluster $clustername).AutoBalancerLevel.toString()
        $levelDescription=$AutoBalancerLevel[$level]
        $mode=(Get-Cluster $clustername).AutoBalancerMode.toString()
        $modeDescription=$AutoBalancerMode[$mode]
        write-host "Clustername: $clusterName`r`n - AutoBalanceLevel: $level $levelDescription`r`n - AutoBalanceMode: $mode $modeDescription"
    }catch{
        write-warning $_
    }

}

getHyperVLoadBalanceMode $clustername
# Sample output
PS C:\Windows\system32> getHyperVLoadBalanceMode
Clustername: cluster1
 - AutoBalanceLevel: 1 (default) Low Move when host is more than 80% loaded
 - AutoBalanceMode: 2 (default) Load balance on node join and every 30 minutes

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

How To Install Graylog in a Kubernetes Cluster Using Helm Charts

The following narrative is based on the assumption that a Kubernetes (current stable version 20.10)…

How to Deploy PiHole in a Kubernetes Cluster

Step 0: Create NFS Share Ensure that the NFS share has been created with these…

Adding a Domain Security Group into the Hyper-V Administrator Users Group

Issue: Resolution: Click Start > Control Panel > Administration Tools > Computer Management > System Tools…
Other project: DragonCoin.com