ESX Virtualization

VMware ESXi, vSphere, VMware Backup, Hyper-V... how-to, videos....

Nakivo Backup and Replication - #1 Backup solution for Virtual, physical, cloud, NAS and SaaS

Menu
  • Certification
      • VCP-DCV vSphere 8
          • vcp2024-125.
        • Close
    • Close
  • VMware
    • Configuration Maximums
    • vSphere
      • vSphere 8.0
      • vSphere 7.0
      • vSphere 6.7
      • vSphere 6.5
      • vSphere 6.0
      • Close
    • VMworld
      • VMware EXPLORE 2024
      • VMware EXPLORE 2023
      • VMware EXPLORE 2022
      • VMworld 2019
      • VMworld 2018
      • VMworld 2017
      • VMworld 2016
      • VMworld 2015
      • VMworld 2014
      • VMworld 2013
      • VMworld 2012
      • VMworld 2011
      • Close
    • Close
  • Microsoft
    • Windows Server 2012
    • Windows Server 2016
    • Windows Server 2019
    • Close
  • Categories
    • Tips – VMware, Microsoft and General IT tips and definitions, What is this?, How this works?
    • Server Virtualization – VMware ESXi, ESXi Free Hypervizor, VMware vSphere Server Virtualization, VMware Cloud and Datacenter Virtualization
    • Backup – Virtualization Backup Solutions, VMware vSphere Backup and ESXi backup solutions.
    • Desktop Virtualization – Desktop Virtualization, VMware Workstation, VMware Fusion, VMware Horizon View, tips and tutorials
    • How To – ESXi Tutorials, IT and virtualization tutorials, VMware ESXi 4.x, ESXi 5.x and VMware vSphere. VMware Workstation and other IT tutorials.
    • Free – Free virtualization utilities, ESXi Free, Monitoring and free backup utilities for ESXi and Hyper-V. Free IT tools.
    • Videos – VMware Virtualization Videos, VMware ESXi Videos, ESXi 4.x, ESXi 5.x tips and videos.
    • Home Lab
    • Reviews – Virtualization Software and reviews, Disaster and backup recovery software reviews. Virtual infrastructure monitoring software review.
    • Close
  • Partners
    • NAKIVO
    • StarWind
    • Zerto
    • Xorux
    • Close
  • This Web
    • News
    • ESXi Lab
    • About
    • Advertise
    • Archives
    • Disclaimer
    • PDFs and Books
    • Close
  • Free
  • Privacy policy

VCP6.7-DCV Objective 7.13 – Identify and interpret affinity/anti-affinity rules

By Vladan SEGET | Last Updated: October 2, 2019

Shares

Today we'll try to cover another objective from The Professional vSphere 6.7 Exam 2019 (2V0-21.19) which leads to VMware Certified Professional – Data Center Virtualization 2019 certification. This post's name is VCP6.7-DCV Objective 7.13 – Identify and interpret affinity/anti-affinity rules.

The original VMware blueprint to pass the Professional vSphere 6.7 Exam 2019 can be found here –  ( PDF Online at VMware 2V0-21.19). I highly recommend getting all the documentation set for studying, other study guides might exist as well.

VCP6.7-DCV Objective 7.13 – Identify and interpret affinity/anti-affinity rules, let's get started.

DRS in fully automated mode can misplace some VMs which admin would not like to. You can configure the VM placement using affinity and anti-affinity rules. If you create a DRS affinity rule for your cluster, you can specify how vSphere HA applies that rule during a virtual machine failover.

For example, you have a tier 3 application composed of multiple VMs ( web frontend, application server, database backend). As usually with tier 3 apps, those “talk” heavily with each other. As such, the backend traffic would be quite significant if you leave to run those VMs on different hosts. The best would be to keep them together on the same host.

The two types of rules for which you can specify vSphere HA failover behavior are the following:

  • VM Affinity/anti-affinity rules force specified virtual machines to remain together (or apart) during failover actions.
  • VM-Host affinity rules place specified virtual machines on a particular host or a member of a defined group of hosts during failover actions.

When you edit a DRS affinity rule, you must use vSphere HA advanced options to enforce the desired failover behavior for vSphere HA.

HA must respect VM anti-affinity rules during failover – When the advanced option for VM anti-affinity rules is set, vSphere HA does not fail over a virtual machine if doing so violates a rule. Instead, vSphere HA issues an event reporting there are insufficient resources to perform the failover.

HA should respect VM to Host affinity rules during failover – vSphere HA attempts to place VMs with this rule on the specified hosts if at all possible.

This guide is available as Free PDF!

Free Download at Nakivo – VCP6.7-DCV Study Guide.

VCP-DCV 2019 Study Guide

VCP-DCV 2019 Study Guide

VM-VM Affinity Rule

You can create VM-Host affinity rules to specify whether or not the members of a selected virtual machine DRS group can run on the members of a specific host DRS group. When set to fully automated mode DRS migrates the VMs to bring them together on the next run of DRS.

A partially automated DRS mode will display the migration recommendation and perform the initial placement when powering on the VM.

VM-VM Anti-Affinity rule

Let's say that we need to keep two VMs apart on different hosts. There you might have an SQL cluster for high availability or perhaps a web server farm that is composed of multiple VMs. If you have let's say two SQL servers on the same physical host and the host has a hardware problem, you will lose VMs the time HA restarts those VMs on another host. As such, you'll most likely have an interruption of service. It is perhaps a good idea to prevent somehow that DRS places those VMs on the same physical host.

A VM-Host affinity rule specifies whether or not the members of a selected virtual machine DRS group can run on the members of a specific host DRS group.

Unlike a VM-VM affinity rule, which specifies an affinity (or anti-affinity) between individual virtual machines, a VM-Host affinity rule specifies an affinity relationship between a group of virtual machines and a group of hosts. There are ‘required' rules (designated by “must”) and ‘preferential' rules (designated by “should”.)

A VM-Host affinity rule includes the following components.

  • One virtual machine DRS group.
  • One host DRS group.
  • A designation of whether the rule is a requirement (“must”) or a preference (“should”) and whether it is affinity (“run on”) or anti-affinity (“not run on”).

You use a VM-Host affinity rule to specify an affinity relationship between a group of virtual machines and a group of hosts.

VM-VM Affinity Rule Conflicts

If you create multiple VM-VM affinity rules, those can be in conflict sometimes, depending on the situation.

If two VM-VM affinity rules are in conflict, you cannot enable both. For example, if one rule keeps two virtual machines together and another rule keeps the same two virtual machines apart, you cannot enable both rules.

You must select one of the rules to apply and you have to disable or remove the other, conflicting rule.

When two VM-VM affinity rules conflict, the older one takes precedence and the newer rule is disabled. DRS only tries to satisfy enabled rules and disabled rules are ignored. DRS gives higher precedence to preventing violations of anti-affinity rules than violations of affinity rules.

Final Words

Stay consistent with the study. Use our study guide but not only. The more you'll read the better. Don't use a single source for the study, but rather multiple sources at the same time. We try to give as many details as possible, with screenshots, but we are not able to cover everything.

Follow the progress of the VCP6.7-DCV Study Guide page for further updates.

Well, this is it for today.

More from ESX Virtualization

  • What is Host Guardian Service?
  • What is vCenter Embedded Linked Mode in vSphere 6.7?
  • What is VMware Snapshot?
  • VMware Tools Offline VIB for ESXi Host – Bundle Download and Install
  • How to Patch VMware vCenter Server Appliance (VCSA) 6.7 Offline

Stay tuned through RSS, and social media channels (Twitter, FB, YouTube)

Shares
Vote !

| Filed Under: Server Virtualization Tagged With: Identify and interpret affinity/anti-affinity rules

About Vladan SEGET

This website is maintained by Vladan SEGET. Vladan is as an Independent consultant, professional blogger, vExpert x16, Veeam Vanguard x9, VCAP-DCA/DCD, ESX Virtualization site has started as a simple bookmarking site, but quickly found a large following of readers and subscribers.

Connect on: Facebook. Feel free to network via Twitter @vladan.

Private Sponsors

Featured

  • Thinking about HCI? G2, an independent tech solutions peer review platform, has published its Winter 2023 Reports on Hyperconverged Infrastructure (HCI) Solutions.
  • Zerto: One Platform for Disaster Recovery, Backup & Cloud Mobility: Try FREE Hands-On Labs Today!
Click to Become a Sponsor

Most Recent

  • Veeam Backup & Replication v13 Beta: A Game-Changer with Linux
  • What is Veeam Data Cloud Vault and how it can help SMBs
  • Nakivo Backup and Replication – Malware Scan Feature
  • Zerto 10 U7 released with VMware NSX 4.2 Support
  • XorMon NG 1.9.0 Infrastructure Monitoring – now also with Veeam Backup Support
  • Heartbeat vs Node Majority StarWind VSAN Failover Strategy
  • Vulnerability in your VMs – VMware Tools Update
  • FREE version of StarWind VSAN vs Trial of Full version
  • Commvault’s Innovations at RSA Conference 2025 San Francisco
  • VMware ESXi FREE is FREE again!

Get new posts by email:

 

 

 

 

Support us on Ko-Fi

 

 

Buy Me a Coffee at ko-fi.com

Sponsors

Free Trials

  • DC Scope for VMware vSphere – optimization, capacity planning, and cost management. Download FREE Trial Here.
  • Augmented Inline Deduplication, Altaro VM Backup v9 For #VMware and #Hyper-V – Grab your copy now download TRIAL.

VMware Engineer Jobs

VMware Engineer Jobs

YouTube

…

Find us on Facebook

ESX Virtualization

…

Copyright © 2025 ·Dynamik-Gen · Genesis Framework · Log in