Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: Azure Local 2311.2 and later; Windows Server 2022, Windows Server 2019, Windows Server 2016
Note
The recommended way to create and manage VMs on Azure Local is using the Azure Arc control plane. However, since the functionality described in this article isn't yet provided by Azure Arc, you can use Windows Admin Center or PowerShell as described in this article. The VMs created this way aren't enabled by Azure Arc, have limited manageability from the Azure Arc control plane, and fewer Azure Hybrid Benefits, including usage of Azure Update Manager at no extra cost.
For more information, see Compare management capabilities of VMs on Azure Local and Supported operations for Azure Local VMs.
A key consideration for Azure Local deployments is the capital expenditure (CapEx) required to go into production. It's common to add redundancy to avoid under-capacity during peak traffic in production, but this increases CapEx. This redundancy is often needed because some machines in the system are hosting more virtual machines (VMs), while other machines are underutilized.
VM load balancing is a feature that allows you to optimize machine utilization in your Azure Local systems. It identifies over-committed machines and live migrates VMs from those machines to under-committed machines. Failure policies such as anti-affinity, fault domains (sites), and possible owners are honored.
VM load balancing evaluates a machine's load based on the following heuristics:
- Current memory pressure: Memory is the most common resource constraint on a Hyper-V host.
- CPU utilization averaged over a five-minute window: Mitigates any machine in the system from becoming over-committed.
VM load balancing occurs automatically when you add a new machine to your Azure Local and can also be configured to perform periodic, recurring load balancing.
When you join a new machine to your system, the VM load balancing feature automatically balances capacity from the existing machines to the newly added machine in the following order:
- The memory pressure and CPU utilization are evaluated on the existing machines in the system.
- All machines exceeding the threshold are identified.
- The machines with the highest memory pressure and CPU utilization are identified to determine priority of balancing.
- VMs are live migrated (with no downtime) from a machine that exceeds the threshold to the newly added machine in the system.
By default, VM load balancing is configured for periodic balancing: the memory pressure and CPU utilization on each machine in the system are evaluated for balancing every 30 minutes. Here's the flow of the steps:
- The memory pressure and CPU utilization are evaluated on all machines in the system.
- All machines exceeding the threshold and those below the threshold are identified.
- The machines with the highest memory pressure and CPU utilization are identified to determine priority of balancing.
- VMs are live migrated (with no downtime) from a machine that exceeds the threshold to another machine that is under the minimum threshold.
The easiest way to configure VM load balancing is using Windows Admin Center.
Connect to your system and go to Tools > Settings.
Under Settings, select Virtual machine load balancing.
Under Balance virtual machines, select Always to load balance upon machine join and every 30 minutes, Server joins to load balance only upon machine joins, or Never to disable the VM load balancing feature. The default setting is Always.
Under Aggressiveness, select Low to live migrate VMs when the machine is more than 80% loaded, Medium to migrate when the machine is more than 70% loaded, or High to average the machines in the system and migrate when the machine is more than 5% above average. The default setting is Low.
You can configure if and when load balancing occurs using the cluster common property AutoBalancerMode
. To control when to balance the cluster, run the following in PowerShell, substituting a value from the table below:
(Get-Cluster).AutoBalancerMode = <value>
AutoBalancerMode | Behavior |
---|---|
0 | Disabled |
1 | Load balance upon machine join |
2 (default) | Load balance upon machine join and every 30 minutes |
You can also configure the aggressiveness of balancing by using the cluster common property AutoBalancerLevel
. To control the aggressiveness threshold, run the following in PowerShell, substituting a value from the table below:
(Get-Cluster).AutoBalancerLevel = <value>
AutoBalancerLevel | Aggressiveness | Behavior |
---|---|---|
1 (default) | Low | Move when host is more than 80% loaded |
2 | Medium | Move when host is more than 70% loaded |
3 | High | Average machines in the system and move when host is more than 5% above average |
To check how the AutoBalancerLevel
and AutoBalancerMode
properties are set, run the following in PowerShell:
Get-Cluster | fl AutoBalancer*
For related information, see also: