
vSphere DRS
Learner Objectives
After completing this lesson, you should be able to meet the following objectives:
- Describe the functions of a vSphere DRS cluster
- Explain how vSphere DRS determines VM placement on hosts in the cluster
- Enable vSphere DRS in a cluster
- Monitor a vSphere DRS cluster
About vSphere DRS
vSphere DRS is a cluster feature that helps improve resource allocation across all hosts in a cluster.
It aggregates computing capacity across a collection of servers into logical resource pools.
vSphere DRS is used in the following situations:
- Initial placement of a VM when it is powered on
- Load balancing
- Migrating VMs when an ESXi host is placed in maintenance mode
vSphere DRS: VM Focused
vSphere DRS is VM focused:
- While the VM is powered on, vSphere DRS operates on an individual VM basis by ensuring that each VM’s resource requirements are met.
- vSphere DRS calculates a score for each VM and gives recommendations (or migrates VMs) for meeting VM’s resource requirements.
About the VM DRS Score
The VM DRS score is a metric that tracks a VM’s execution efficiency on a given host. Execution efficiency is the frequency that the VM is reported as having its resources requirements met:
- Values closer to 0% indicate severe resource contention.
- Values closer to 100% indicate mild to no resource contention.
VM DRS Score List
The cluster’s Monitor tab lists the VM DRS Score and more detailed metrics for all the VMs in the cluster.
Viewing VM DRS Scores Using Performance Charts (1)
The advanced performance chart for a cluster object provides the DRS Score counter.
Viewing VM DRS Scores Using Performance Charts (2)
The DRS Score counter displays the DRS scores for VMs in the cluster over the selected time period.
Viewing vSphere DRS Settings
When you click VIEW DRS SETTINGS, the main vSphere DRS parameters and their current values are shown. vSphere DRS settings include:
- • Automation level
- • Migration threshold
vSphere DRS Settings: Automation Level
You can configure the automation level for the initial placement of VMs and for dynamic balancing while VMs are running.
vSphere DRS Settings: Migration Threshold
The migration threshold determines how aggressively vSphere DRS selects to migrate VMs.
vSphere DRS Settings: Predictive DRS
vSphere DRS and vRealize Operations Manager combine data to predict future demand and determine when and where high resource utilization occurs. To make predictive decisions, the vSphere DRS data collector retrieves the following data:
- Resource usage statistics from ESXi hosts
- Predicted usage statistics from the vRealize Operations Manager server Predicted usage statistics always take precedence over current usage statistics.
vSphere DRS Settings: VM Swap File Location
By default, swap files for a VM are on a datastore in the folder containing the other VM files. For all VMs in the cluster, you can place VM swap files on an alternative datastore. If vSphere DRS is enabled, you should place the VM swap file in the VM’s directory.
vSphere DRS Settings: VM Affinity
vSphere DRS virtual machine affinity rules specify that selected VMs be placed either on the same host (affinity) or on separate hosts (anti-affinity):
- Affinity rules: Use for multiVM systems where VMs communicate heavily with one another.
- Anti-affinity rules: Use for multi-VM systems where load balancing or high availability is desired.
vSphere DRS Settings: DRS Groups
VM groups and host groups are used in defining VM-Host affinity rules. The VM-Host affinity rule specifies whether VMs can or cannot be run on a host. Types of groups:
- VM group: One or more VMs
- Host group: One or more ESXi hosts A VM can belong to multiple VM groups.
A host can belong to multiple host groups.
vSphere DRS Settings: VM-Host Affinity Rules
A VM-Host affinity rule:
- Defines an affinity (or anti-affinity) relationship between a VM group and a host group
- Is either a required rule or a preferential rule Rule options:
- Must run on hosts in group
- Should run on hosts in group
- Must not run on hosts in group
- Should not run on hosts in group
VM-Host Affinity Preferential Rules
A preferential rule is softly enforced and can be violated if necessary. Example: Separate VMs on different blade systems for improved performance.
VM-Host Affinity Required Rules
A required rule is strictly enforced and can never be violated. Example: Enforce host-based ISV licensing.
vSphere DRS Settings: VM-Level Automation
You can customize the automation level for individual VMs in a cluster to override the automation level set on the entire cluster.
vSphere DRS Cluster Requirements
ESXi hosts that are added to a vSphere DRS cluster must meet certain requirements to use cluster features successfully:
- To use vSphere DRS for load balancing, the hosts in your cluster must be part of a vSphere vMotion network:
- If the hosts are not part of a vSphere vMotion network, vSphere DRS can still make initial placement recommendations.
- vSphere DRS works best if the VMs meet vSphere vMotion requirements.
- Configure all managed hosts to use shared storage.
Viewing vSphere DRS Cluster Resource Utilization
From the cluster’s Monitor tab, you can view CPU, memory, and network utilization per host.
Viewing vSphere DRS Recommendations
The DRS Recommendations pane displays information about the vSphere DRS recommendations made for the cluster. You can also view the faults that occurred when the recommendations were applied and the history of vSphere DRS actions.
Maintenance Mode and Standby Mode
Maintenance mode:
- Removes a host’s resources from a cluster, making those resources unavailable for use
- Is often used to service a host in a cluster
To place a host in maintenance mode:
- All running VMs on the host must be migrated to another host, shut down or suspended.
- When DRS is in fully automated mode, powered-on VMs are automatically migrated from a host that is placed in maintenance mode.
Standby mode:
- Is used by vSphere DPM to optimize power usage. When a host is placed in standby mode, it is powered off.
Removing a Host from the vSphere DRS Cluster
To remove a host from a cluster:
- Place the host in maintenance mode.
- Drag the host to a different inventory location, for example, the data center or another cluster.
The resources available for the cluster decrease.
vSphere DRS and Dynamic DirectPath I/O
Dynamic DirectPath I/O improves the vSphere DirectPath I/O functionality by adding a layer of abstraction between a VM and the physical PCI device:
A pool of PCI devices that are available in the cluster can be assigned to the VM.
vSphere DRS is aware of Dynamic DirectPath I/O devices:
- When the VM is powered on, vSphere DRS places the VM on any ESXi host that provides the assigned PCI device.
- vSphere DRS takes action only at VM power on and does not perform any load-balancing actions.
Adding a Dynamic DirectPath I/O Device to a VM
You can add Dynamic DirectPath I/O devices to a VM by editing the VM’s settings.
Review of Learner Objectives
After completing this vSphere DRS lesson, you should be able to meet the following objectives:
- Describe the functions of a vSphere DRS cluster
- Explain how vSphere DRS determines VM placement on hosts in the cluster
- Enable vSphere DRS in a cluster
- Monitor a vSphere DRS cluster