Implementing a vSphere DRS CLuster

Uncategorized

DRS Cluster is a group of ESXi hosts , When grouped hosts in to clusters the environment becomes shared and resources are shared among VM’s. Advantages like Load Balancing , Power management and Virtual machine placement can be utilized.

Load balancing: distribute the load across resources. Vcenter server system based on criteria set on the cluster, verifies the cpu and memory utilization and provides recommendations regarding migration of Virtual machines while starting a virtual machine or when a DRS(Distributed resource system) attempts to maintain load balance.

Power management :DTM(Distributed power management) puts or recommends the hosts,VM’s to place on standby mode based on utility of VM’s and allowing other VM’s to run on the same host based on capacity available on the host and demand of cluster.

Virtual machine Placement: We can hold the placement of virtual machines based on affinity or anti affinity rules set on cluster.

In this lab , We verify and learn the features like load balancing and Virtual machine placement by creating affinity rules and load balancer.

Task1: Create a load balance

Step1: Login and migrate all VM’s VM1-2 , VM2-1, VM2-2 on to single host (use single compute resource only migration) Check on HOsts>VM’tab or by clicking each host

Step2:Ensure that all VM’s are powered on

Step3: Run CPU BUsy file in command prompt

Task2: Create a vSphere DRS Cluster

Step1: Labcluster>Settings>vSphereDRS

Step2: Edit the DRS Setting

Step3: Turn on DRS Setting and migration threshold to aggresive

Task3:Verify proper vSphere DRS Cluster Fuctionality

Step1: LabCLuster>Monitor tab>vsphere DRS and click run DRS now

Step2: while the process is ongoing, In summary tab expand vSphere DRS Pane to check whether the state is imbalanced or not

Does the guage show that the load is imbalanced? Yes, it does since the CPUBusy processes are running on VM’s

Step3:Navigate to Monitor tab >Vsphere DRS>CPU Utilization to check the cpu’s used on ESXi hosts

Step4:Open recommendations pane in vSphere DRS or try to on any other VM to get a prompt with recommendation about migration of virtual machines and click apply recommendations

Step5:Click monitor>Tasks and events to verify whether recommendations are applied.

Step6: Click on vSphere DRS and RUN the DRS again

Is any recommendation shown? NO, SInce all are applied

Step7: Click on guage and check whether its balanced now

DOes the guage show that the load is balanced now? Yes, since the VM’s are migrated and there are hosts are not heavily loaded.

Step8: Check CPU Utilization to verify whether there is a spread across hosts and yes it is ESXi 1 is increased and 2 decreased .

Task4: Create, test and Disable a Vm-VM affinity rule

Step1: Select Lab Cluster>VM’s and then right click to adjust columns

Step2: Add host column to table for easy monitoring

Step3: CLick on settings of lab cluster

Step4: Click configure>and add VM’s host rules by clicking add

Step5: Name it as colocote-vm2-vms and check enable rule option with type as keep virtual machines together

Step6: click on Add to display VM’s where we need to verify these rules and add all VM2-1,VM2-2 and VM2-3

Step7:Click on RUN DNS and apply recommendations and view the tasks in tasks and events pane

DO you see any recommendations and why? Yes since as per the rule all the above VM’s should reside on same host and since they are not recommendations are to migrate them to single host

Step8: Verify whether VM2-1 has moved from 2 to 1 host, yes the rule is applied and moved

Step9:navigate to rules and uncheck enable rule to disable colocate rule

Task5:Create,test and disable anti-affinity rule

Step1:similar to above task name as seperate -vm2-vms and type as seperate virtual machines and add VM2-2 and VM2-3

Step2:Run DRs to check the verifications and it displays a migration recommendation since VM2-2 and VM2-3 cannot reside on same host.

Step3: Apply Recommendations and check the recents tasks bar located below to monitor the status

Step4: Navigate to VM’s pan and check the hosts and they are migrated

Task6:Create, test and disable VM-Host Affinity rule

Step1: Add a VM/Host group

Step2: Name it as VM2-Vm’s and type as VM Group and add the hosts with VM2-1 ,VM2-2 and VM 2-3

Step3: Add one more group with name VM2-host and type as host group

Step4: Add host ESXi2 to the above created host group and click ok

Step4: Create a rule name Run-Only-Host2 and select type as virtual machines to hosts

Select the VM’s group and HOsts group

Step5: RUn DRS now for recommendations

What Recommendations did vSphere DRS make and why? Since the VM’s VM2-3 and VM2-2 should be on host ESXi2 it recommended to migrate and satisy the rule created.

Step6: Apply recommendations and monitor status in tasks and events pane

Step7:We can check that VM2-3 is migrated to ESXi2 from one as per rule

Step8:Check the CPU and memory utilizations of hosts to monitor the status

Step9: Click on a VM which is on ESXi2 and migrate to 1

Step10: An error states that Host affinity rule is violated.

Step11: Open rules and disable rule

Trouble shooting:

1.Only error that i got prompted in this lab is that the recommendations got expired

Solution: rerun DRS and apply recommendations faster.

Critical Thinking:

Load balancing and placements are created and managed in this lab which is a good outcome of learning.

Load balancing helps in managing load between the resources, If in case the entire traffic is routed to single ESXi it may go down or fail which will interrupt user services helps in balancing memory and CPU load between esxi’s . Re-routing traffic to others esxi’s doesn’t only help to provide continuity in services but also in proper utilization of resources.

Placements helps in grouping and managing resources as per company . For example , an entire application resources can be grouped and placed under one ESXI which can be shutdown when the app is not needed , upgraded, migrated or in case of maintenance effecting only those VM’s. It also helps in avoiding movement of VM’s to ESXi’s where the resources are insufficient to run Virtual machines.

Leave a comment