VMware vSphere 7.x Study Guide for VMware Certified Professional – Data Center Virtualization certification. This article covers Section 1: Architectures and Technologies. Objective 1.6.1 – Describe Distributed Resource Scheduler (DRS)
This article is part of the VMware vSphere 7.x - VCP-DCV Study Guide. Check out this page first for an introduction, disclaimer, and updates on the guide. The page also includes a collection of articles matching each objective of the official VCP-DCV.
Describe Distributed Resource Scheduler (DRS)
In objective 1.6.1, you need to describe Distributed Resource Scheduler (DRS). DRS, in partnership with vMotion, is one of the coolest products offered by VMware. First, let’s study what DRS is and its key features. Then, let’s take a look at the DRS’ major requirements and key topics: DRS automation and aggression levels, and DRS rules. Finally, let's take a glance at other important DRS features.
Note: If you ask anyone what is the most impressive VMware technology they had worked with, more often than not, they will tell vMotion and DRS. Watching a virtual machine moving (migrating) from one host to another without the need to be powered off, is something that still amazes me.
1. What is VMware DRS
VMware vSphere Distributed Resource Scheduler (DRS) is the resource management feature of vSphere. DRS improves vSphere workload management by grouping VMware ESXi hosts into resource clusters to segregate the computing needs of different business units.
VMware DRS is included in the vSphere Enterprise Plus.
DRS has the following two main functions:
- Using intelligent placement, decide which node of a cluster should run a VM when it's powered on.
- To evaluate the load on the cluster over time and either make recommendations for migrations or use vMotion to move VMs to automatically create a more balanced cluster workload.
DRS groups VMware ESXi hosts into resource clusters to segregate the computing needs of different business units. VMware vSphere clusters allow to:
- Provide highly available resources to the workloads.
- Balance workloads for optimal performance.
- Scale and manage computing resources without service disruption.
1.1 vSphere Cluster Services (vCLS)
vSphere Cluster Services (vCLS) is enabled by default and runs in all vSphere clusters. vCLS ensures that if the vCenter Server becomes unavailable, cluster services remain available to maintain the resources and health of the workloads that run in the clusters.
- vCLS is enabled when you upgrade to vSphere 7.0 U3 or when you have a new vSphere 7.0 U3 deployment. vCLS is upgraded as part of the vCenter Server upgrade.
- vCLS uses agent virtual machines to maintain cluster service's health. The vCLS agent virtual machines (vCLS VMs) are created when you add hosts to clusters. Up to three vCLS VMs must run in each vSphere cluster, distributed within a cluster.
2. DRS Key Features
DRS balances computing capacity by cluster to deliver optimized performance for hosts and virtual machines. DRS is used to:
- Improve service levels by guaranteeing appropriate resources to virtual machines.
- Deploy new capacity to a cluster without service disruption.
- Automatically migrate virtual machines during maintenance without service disruption.
- Monitor and manage more infrastructure per system administrator.
Initial Workload Placement
When you power on a virtual machine in a cluster, DRS places it on an appropriate host or generates a recommendation, depending on the automation level selected.
- Automation levels, also known as migration thresholds, range from conservative to aggressive.
- VMware vCenter will only apply recommendations that satisfy cluster constraints such as host affinity rules or maintenance.
- VMware vCenter uses DRS recommendations that can provide even a slight improvement to the cluster's overall load balance.
Automated Load Balancing
DRS spreads the virtual machine workloads across vSphere hosts inside a cluster and monitors available resources for you. DRS will migrate (VMware vSphere vMotion) virtual machines to other hosts within the cluster to maximize performance; based on the automation level.
DRS accelerates the VMware vSphere Update Manager remediation process by determining the optimum number of hosts that can enter maintenance mode simultaneously, based on current cluster conditions and demands.
DRS redistributes virtual machines across vSphere cluster hosts to comply with user-defined affinity and anti-affinity rules following host failures or during maintenance operations.
3. DRS requirements
Before using vSphere DRS, be sure the vSphere environment meets these requirements:
- Use a vSphere Enterprise Plus license.
- vCenter Server needs to be installed.
- vSphere Cluster Services (vCLS) (vSphere 7.0 U3)
- CPU compatibility or Enhanced vMotion Compatibility (EVC)
- DRS clusters must be part of a vMotion migration network.
- DRS should meet vSphere vMotion requirements.
- All hosts (DRS cluster) should use shared storage.
4. DRS Key Settings
Although DRS performs initial placements so that load is balanced across the cluster, changes in virtual machine load and resource availability can cause the cluster to become unbalanced. To correct such imbalances, DRS generates migration recommendations.
When a cluster becomes unbalanced, DRS makes recommendations or migrates virtual machines, depending on the default automation level.
4.1 DRS Automation Levels
During initial placement and load balancing, DRS generates placement and vMotion recommendations, respectively. DRS can apply these recommendations automatically, or you can use them manually.
DRS has three levels of automation:
You must use both initial placement and load balancing recommendations.
- When a DRS cluster is set to Manual, every time you power on a VM, the cluster recommends selecting the ESXi host where that VM should be hosted.
- The Manual setting also suggests vMotion migrations when DRS detects an imbalance between ESXi hosts in the cluster.
DRS applies recommendations only for initial placement.
- DRS will automatically decide which host a VM should run on when initially powered on. It does not ask the user who is performing the power-on task.
- It will still apply recommendations for all migrations, which are still manual.
DRS applies both initial placement and load balancing recommendations automatically.
- DRS makes initial placement decisions without recommendations.
- It makes automatic vMotion decisions based on the selected aggression level.
4.2 DRS Migration Threshold
The DRS migration threshold allows you to specify which recommendations are generated and then applied (if in fully automated mode) or shown (if in manual mode).
This threshold measures how aggressive DRS is in recommending migrations to improve VM happiness.
- You can move the threshold slider to use one of five settings, ranging from Conservative to Aggressive.
- The higher the aggressiveness setting, the more frequently DRS might recommend migrations to improve VM happiness.
- The Conservative setting generates only priority-one recommendations (mandatory recommendations).
After a recommendation receives a priority level, this level is compared to the migration threshold you set. If the priority level is less than or equal to the threshold setting, the recommendation is either:
- Applied (if the relevant virtual machines are in fully automated mode) or
- Displayed to the user for confirmation (if in manual or partially automated mode.)
4.3 DRS Rules
To further allow you to customize the behavior of vSphere DRS for your specific environment, vSphere lets you create DRS rules. You can control the placement of virtual machines on hosts within a cluster by using affinity rules.
You can create two types of rules VM-VM Affinity Rules and VM-Host Affinity Rules.
VM-VM affinity rule
A VM-VM affinity rule specifies whether individual virtual machines should run on the same host or be maintained on separate hosts. This type of rule creates affinity or anti-affinity between individual virtual machines that you select.
- When an affinity rule is created, DRS tries to keep the specified virtual machines together on the same host.
- DRS tries to keep the selected virtual machines apart with an anti-affinity rule.
VM-Host affinity rule
A VM-Host affinity rule specifies whether or not the members of a selected virtual machine DRS group can run on the members of a specific host DRS group. It defines an affinity relationship between a group of virtual machines and hosts.
A VM-Host affinity rule includes the following components.
- One virtual machine DRS group.
- One host DRS group.
- A designation of whether the rule is a requirement (must) or a preference (should)
- A designation whether the rule is is affinity or anti-affinity.
5. Other DRS Features
5.1 Distributed Power Management (DPM)
DRS optimizes power consumption dynamically within a vSphere cluster with VMware vSphere Distributed Power Management (DPM).
- DPM is also included in vSphere Enterprise Plus and vSphere with Operation Management Enterprise Plus editions.
- Like DRS, vSphere's DPM feature optimizes power consumption at the cluster and host levels.
- DPM compares cluster- and host-level capacity to virtual machine demand, including recent historical demand, and places hosts in standby mode.
When capacity demands increase, DPM powers on hosts on standby to absorb the additional workload. DPM can also be set to issue recommendations but take no action.
When demand for resources is low, DPM places hosts in standby mode, and when demand is high, DPM powers on enough hosts to manage that demand and keep your services available.
Dynamic power management with DPM allows to:
- Cut power and cooling costs by 20 percent during low utilization periods.
- Automate energy management in the data center more efficiently.
5.2 Predictive DRS
Predictive DRS leverages data from vRealize Suite operations to provide better placement, load balancing, and resource contention prevention. The goal of Predictive DRS is to respond in advance to metrics being forecasted by DRS, based on known usage patterns of the workloads on the platform. vRealize Operations Manager can send these forecasts and predicted utilization spikes and the resource contention. Predictive DRS enables the user to mitigate potential host failures.
5.3 Storage DRS
Storage DRS is discussed in Objective 1.6.5.
The topic reviewed in this article is part of the VMware vSphere 7.x Exam (2V0-21.20), which leads to the VMware Certified Professional – Data Center Virtualization 2021 certification.
Section 1 - Architectures and Technologies.
Objective 1.6.1 – Describe Distributed Resource Scheduler (DRS)