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

VMWare and AWS Domain Controller Best Practices

VMware:AWS:https://aws.amazon.com/windows/resources/whitepapers/1. Controlling clock driftKerberos is used for authentication protocol; thus, time synchronization is very criticalMethod…

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 Install VMware Tools on Centos 7

su -yum install gcc gcc-c++ make binutils -yyum update kernelreboot--------su -yum install kernel-headers kernel-PAE-develuname -rs--------copy…