vCenter-Configure DRS

DRS-Distributed Resource Scheduler is used to load balance our Vmware cluster/s.

To enable DRS, just go to the settings of the cluster and we can enable vSphere DRS.

clip_image001

There are three modes in DRS

Manual- In this case vCenter server will not trigger any vm migration, but it will give the vm load balancing recommendation.

Partially Automated-During the power on of virtual machines, vms will be placed onto hosts & it will give the recommendation as manual mode.

Fully automated-With full automation mode vCenter will automatically load balance the cluster. We can set the aggressive level.

clip_image002

Affinity & Anti-affinity rules

With below example we have two application servers which are running same soffware.

We need to prevent running these two vms in same host. Then anti-affiniy rull will help us.

clip_image003

We have created two anti-affiny rules.

clip_image004

clip_image005

When both vms are powered off, we can move it a same host. But when we are power on one vm , one vm will automatically move to the different host in the cluster.

If we have only two nodes cluster , and we want to do some maintenance work on one node. Yes in this case we can move both virtual machine to one host.

VM to Host rule

Using VM/host groups, we can create vm or host groups.

With below example, we are creating vm group called App-vm and we have added appvm01 to this group.

clip_image006

Same way we can crete esx host group

Here we have created one host group and added only one host(esx05). My requirement is to run appvm01 only in the esx05.

clip_image007

Now we can create “Virtual Machine to Hosts” rule as below mentioned.

Rule name-“Run appvm on esx05”

We have to enable this rule

Type

There are four options.

  1. Must run on hosts in group-Mentioned virtual machine must run on this host group.
  2. Should run on host in group-Mentioned virtual machine/s should run on this host group, but not required.
  3. Must not run on host group-Mentioend virtual machine must not run on this host group
  4. Should not run on host group-Mentioned virtual machine/s should not run on this host group, but not required

clip_image008

If we use must rule, we can’t even the vMotion. It will give the error massage saying we are violate virtual affinity rule

clip_image009

Even in the host failure scenario with must rule should not power on vm.

*with below example, we have created must rule(appvm01 must run on esx05).Now esx05 goes down, but appvm01 will not power on esx06

clip_image010

Storage DRS

Same as host cluster we can configure datastores as cluster

Its very easy

Just right click on the datacenter from storage view > Select Storage > Select New Datastore cluster > Assign datastore cluster name

clip_image011

clip_image012

Datastore cluster we can select the DRS mode(Either “Fully Automated” or “No automation”(Manual Mode”)

Other than that there are few options.

clip_image013

Set the required thresholds

  • If you’re only considering space, we can remove “Enable I/O metric for SDRS recommendations” options.

clip_image014

We can configure some advanced configuration.

“No recommendations until utilization difference between source & destination is”

We can explain this using example- We have two datastores(DatastoreA & Datastore B) and both are 100GB.

Usage of DatastoreA is 81GB(84%) and DatastoreB is 78GB(78%).According to our SDRS policy is should move some virtual machine from DatastoreA to DatastoreB, but we have set the above option to 5% and difference between our two datastores is 3%. Which means any virtual machines will not move vms from DatastoreA to DatastoreB.

clip_image015

From here we can select the host clusters for this datastore

clip_image016

Select the datastores for datastore cluster

clip_image017

Click on “Finish”

clip_image018

Same as host cluster, we can configure affinity rules in storage cluster/s.

clip_image019

With SDRS we can only configure anti-affinity rules as bellows.

*VMDK anti-affinity- once we configure this rule, mentioned VMDK files will keep in two different datastaores

*VM anti-affinity-once we configure this rule, given VM s will be store in two different datastores

clip_image020

clip_image021

clip_image022

Once we complete this & when we are trying to move two vms(antiaffinity rule configured) to single datastore, it will give this error.

clip_image023

Because of this reason we cannot put these datastores to the maintenance mode. To resolve this problem, we can add one advanced configuration to the SDRS settings.

clip_image024

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: