Fotolia

Use DRS for VMware load balancing and streamlined environments

VMware DRS uses vMotion to automatically migrate VMs and workloads to available hosts and avoid resource contention. Discover the basics of this essential VMware utility.

VMware Distributed Resource Scheduler is a utility that helps balance workloads with available virtualized resources. With it, you can define the rules for allocating physical resources among VMs.

DRS runs within vCenter Server to automatically balance the memory load on all VMs in a given cluster. In addition to allocating resources, you can configure it to migrate workloads with vMotion or assign migrations based on predefined rules. The only things DRS requires are a cluster with shared storage, connection to a Storage vMotion network, vSphere Enterprise or higher, and CPU compatibility.

Besides load balancing, DRS provides dedicated infrastructures for individual business units, continuous monitoring of hardware use, centralized hardware control and downtime-free server maintenance.

How DRS ensures VM availability

DRS facilitates VM high availability by bringing hosts out of standby mode so that vSphere High Availability (HA) can perform failover. It also automatically migrates VMs to free up resources for a necessary VM failover.

You can use affinity or anti-affinity rules with DRS to ensure certain VMs fail over or don't fail over to certain hosts. This can help avoid functional and performance problems, and ensures DRS and HA continue to operate as intended. Misplaced VMs can cause compute shortfalls and lead to resource contention.

You can use affinity or anti-affinity rules with DRS to ensure certain VMs fail over or don't fail over to certain hosts.

Understand affinity and anti-affinity rules

Affinity and anti-affinity rules are the key to DRS. They establish a relationship between a VM and a host by telling the hypervisor to keep specific entities together or separate. This keeps traffic and workloads balanced on available hosts and resources properly distributed.

You can apply these rules to DRS through the vSphere Web Client. Begin by clicking through Manage > Settings > DRS Rules, then click Add to create a new rule. You can name your rule, then open the Type drop-down menu and select Virtual Machines to Hosts. You can also apply VM to VM affinity and anti-affinity rules to ensure specific VMs either remain together on the same host or are on separate hosts in the event of failover or VM shuffling.

Troubleshooting DRS

DRS sometimes powers off certain servers in order to conserve energy, then powers them back on when there's demand for them. However, sometimes certain servers won't power down, and this can often be the fault of conflicting DRS rules.

When troubleshooting DRS issues, first ensure your rules don't conflict and DRS isn't configured with a high-migration threshold setting. If a destination server doesn't have enough resources to host a VM, the system will prevent a VM from migrating to that server. Hypervisor incompatibility can also contribute to the problem. Check configurations of software, such as vMotion and Distributed Power Management, as well as hardware, such as Wake-on-LAN and Intelligent Platform Management Interface, to ensure everything is compatible with DRS.

Using DRS with HA for optimal VMware load balancing

You can use DRS to prevent the failure of your hosts. DRS uses vMotion to automatically balance and optimize workloads across many hosts. It monitors cluster resources and, in the event of resource contention, migrates VMs to other hosts with available resources. DRS also powers down unnecessary and unused servers to improve efficiency and performance.

Meanwhile, HA is a utility that pools VMs and hosts into a cluster and monitors those hosts for failure. In the event of failure, HA restarts the affected VMs on a different server. Using DRS and HA together combines the capabilities of automatic failover and load balancing, enabling faster rebalancing of workloads and reduced repercussions from a failure.

You can also use HA tags with DRS rules to better manage workloads. Tags make specific VMs and workloads searchable, making it easier to organize by category and create affinity and anti-affinity rules that make sense and streamline your environment. You can set VM priority for isolation and failover, which eases the recovery process following an outage or failure.

Dig Deeper on VMware ESXi, vSphere and vCenter

Virtual Desktop
Data Center
Cloud Computing
Close