VMware Cloud Community
Mahee_rr
Contributor
Contributor

DRS affinity rules

Hi

If i set the DRS rules VMs must run on the host, DRS automation level should be on manual or fully automated?

If i set fully automates is there any issue and which is the best practice.

Tags (1)
Reply
0 Kudos
3 Replies
Alex_Romeo
Leadership
Leadership

Hi,

DRS Performance Best Practices:

You can specify DRS modes of automatic, manual, or partially automated at the cluster level as well as the  virtual machine level.

We recommend that you keep the cluster in automatic mode. For virtual machines  sensitive to VMotion, you can set manual mode at the virtual machine level. This setting allows you to  decide if and when the virtual machine can be migrated. Keep virtual machines in DRS automatic mode  as much as possible, because virtual machines in automatic mode are considered for cluster load balance  migrations across ESX hosts before virtual machines that cannot be migrated without user actions.

https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/techpaper/drs_performance_best_pra...

ARomeo

Blog: https://www.aleadmin.it/
Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee

The automation mode and any rules have an independent meaning.

Rules tell DRS where it should be trying to place VMs relative to one another, and by definition will generate a priority 1 recommendation to migrate any VMs currently violating rules.

The automation mode tells vCenter whether it should be applying DRS recommendations automatically or not.

If your cluster is not fully automated, expect to see priority 1 recommendations that need to be applied by the administrator in times when rules are violated.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
bmrkmr
Enthusiast
Enthusiast

I take it you want the cluster to run DRS fully automated but pin one or more specific VM(s) to a certain host (by "must run on host" rule).

In that case you can leave DRS Automation in "VM Overrides" at Default, still the VM will be kept on the host if possible.

you could manually vMotion it and DRS would immediately move it back to this host...

Note it depends on whether you would want HA to restart the VM in case this specific host fails.

If you set it in "VM Overrides" HA Restart Priority as normal (Default) then HA would re-start on another host and DRS would warn that you violate a rule.

If you have a VM that you do not care on which host it runs but which should no be moved (vMotioned) by DRS, it would be sufficient to set DRS Automation to manual.

Reply
0 Kudos