Windows virtual machine

OVERVIEW 

In this blog, we are sharing information about how to load balance Virtual machine using failover cluster and how to configure the VM aggressiveness on Windows using failover cluster manager.

INTRODUCTION

Load balancing will increase the cluster-wide performance. It’s essential to identify over committed nodes and re-balances the virtual machines. Once load balancing is enabled, VM’s are live migrated to idle nodes with no downtime.

LOAD BALANCE METRICS

Load balancing (aka Node fairness) evaluated a node’s load based on two aspects. They are.

  • Current Memory Pressure – Need to Validate whether the Hyper-V host have enough memory to support all the VM’s it’s running
  • CPU Utilization over a 5 minute period – If Hyper-V host is too loaded to accommodate all the VM’s.

Load balancing will be trigger when memory (or) CPU utilization reaches its pre-defined threshold.

CONTROLLING LOAD BALANCING MODE

There are two new cluster wide property are created. They are.

AutoBalancer Mode & AutoBalancel Level

Below table cloumn shows the autobalancer mode behaviour

AUTOBALANCER MODEBEHAVIOUR
0Disabled
1Load Balance on node join
2Load balance on a node join and every 30 minutes
STEPS TO AUTOBALANCER MODE THROUGH FAIL-OVER CLUSTER MANAGER
  • Open Fail over cluster manager MMC.
load balance Virtual machine
  • Right click on cluster name and select properties.
load balance Virtual machine
  • Then click on Balance tab.
load balance Virtual machine
  • There you can able to see three option for Auto balance Mode.
load balance Virtual machine

By default, it use the option 2 (Always load balance).

STEPS TO ENABLE AUTOBALANCERMODE THROUGH POWERSHELL

  • From powershell, to find the current autobalancer mode, type

get-cluster | select autobalancermode

load balance Virtual machine
  • To set new autobalancer mode, type.

(get-cluster).autobalancermode=<value>

load balance Virtual machine

CONTROLLING AGGRESSIVENESS OF LOAD BALANCING

We need to use the cluster property autobalancerlevel to control the load balacing aggressiveness.

AGGRESSIVE LEVELS
AUTOBALANCER LEVELAGGRESSIVENESSBEHAVIOR
1 (default)LowMove when host is more than 80% loaded.
2MediumMove when host is more than 70% loaded.
3HighMove when host is more than 60% loaded.
STEPS TO ENABLE LOAD BALANCING AGGRESSIVENESS THROUGH FAILOVER CLUSTER
  • Open Failover cluster manager MMC.
load balance Virtual machine
  • Right click on cluster name and select properties.
load balance Virtual machine
  • Then click on Balancer tab.

  • There you will find three option to control load balancing aggressiveness.
load balance Virtual machine

By default, it use Low aggressiveness for fail over clustering in windows 2016.

STEPS TO ENABLE LOAD BALANCING AGGRESSIVENESS THROUGH POWER-SHELL
  • From powershell, to find current aggressive level, type.

get-cluster | select autobalancerlevel

load balance Virtual machine
  • To set new autobalance level, type

(get-cluster).Autobalancerlevel=<value>

load balance Virtual machine

Video

Thanks for reading this blog. We hope it will be useful for you to configure the virtual machine load balancing using failover cluster manager and PowerShell.

Loges