DRS continuously monitors utilization across ESXi hosts. It smartly allocates available resources among virtual machines, based on business or resource requirements. DRS is a powerful feature which balances the virtual workloads automatically, in order to effectively manage available resources and eliminate resource contention across configured hosts. DRS makes use of vMotion to optimize resource automation for automatic migration of VMs across hosts in a cluster. Using a feature called initial placement DRS ensures that added virtual machines are placed on a particular ESXi host with the lowest resource utilization. As a result, newly created virtual machine don’t affect a DRS cluster’s fair resource distribution. DRS can also be configured to manually or partially automate or fully automate for allocating resources as per requirements in different virtual server setups.
DRS utilizes resource pools and clusters that combine the resources of multiple hosts into one single entity. An administrator can also create multiple resource pools to divide the resources of single or multiple hosts into various entities.
When a VM encounters increase in load, DRS checks for its priority against the defined resource allocation rules. If the requirements are met, it allocates the virtual machine among the physical servers to provide them necessary resources, and to eliminate resource contention. After the resources are allocated, vMotion migrates the virtual machine to a different host. The dynamic resource allocation also ensures that the resources are always made available to VMs with higher priority. while simultaneously maximizing overall resource utilization.
DRS can be configured in the same way as HA. It can be configured during the cluster creation or whenever required. To configure DRS in your virtualized infrastructure, the mentioned procedure are as follows:
- Select the desired cluster on which DRS needs to be enabled.
- Go to the Manage tab and Settings.
- Under Services, click vSphere DRS.
4. Click the Edit button.
5. Select Turn On vSphere DRS.
You can optionally configure some additional settings to change the way DRS functions. To access these settings, click on the VMware DRS item in the Cluster Settings window.
Also, we can customize the way DRS performs its operations. It has three basic modes of working which can be switched as per needs. These modes are:
- Manual: A VM is initially placed on an ESXi host recommended by DRS, after being approved by the administrator. It is not migrated afterwards; the administrator needs to adjust the VM placement manually.
- Partially Automated: VMs are initially placed on ESXi hosts automatically. DRS recommends to migrate workloads if necessary, but the administrator still needs to approve recommendations.
- Fully Automated: VMs are placed and migrated automatically, based on DRS recommendations.
After DRS is successfully enabled, the administrator can monitor it by selecting the cluster in vCenter Server and choosing the Summary tab. All the details related to load deviations, the number of faults and recommendations, and the automation level are displayed. By clicking the Resource distribution chart, the administrator can also check CPU and memory utilization on a per VM basis, grouped by host.
DRS cluster is a group of ESXi hosts and its virtual machines, which shares resources and are managed by the same vCenter Server. A DRS cluster enables cluster level resource management for effective utilization of the resources. Whenever a host is added to a DRS cluster, the cluster acquires the resources of the host and is added to cluster’s resource pool and all the cluster wide resource allocation policies and protocols are by-default implemented on the host.
Managing and optimizing DRS Clusters
DRS clusters can be managed using vCenter Server, and following operations can be performed to configure the DRS cluster:
- Adding hosts to the cluster
- Adding virtual machines to the cluster
- Managing power resources for a cluster
Adding a host to the cluster
To add a host to the cluster, perform the following steps:
- Select the host to be added from the inventory.
- Drag the host to the target cluster.
- Select as per need – should a new resource pool be created for the host’s virtual machines or can the resources be merged in the cluster’s resource pool?
To remove hosts from a cluster, maintenance mode has to be enabled first. We can then drag and move the host to any other cluster or location in the inventory.
Adding virtual machines to the cluster
There are three different ways to add virtual machines to a cluster, which are explained next:
- All virtual machines in a host are, by default, added to the cluster, if the host is added to the cluster
- Virtual machines can be migrated from a host to a cluster, or from a cluster to another cluster using vMotion
- A virtual machine can be added to a cluster while creation, by just selecting the location as the desired cluster
To remove a virtual machine from a cluster, the virtual machine can be migrated from the cluster to another host or cluster; or the host can be removed from the cluster and all virtual machines in it will be moved to the desired location.
Managing power resources in a cluster
Distributed Power Management (DPM) is a component of DRS, which monitors and tracks power requirements of hardware resources. It cuts off or allocates power as per need. DPM can be enabled from Power Management Settings under every cluster’s settings.