Boost VM resiliency, performance, and compliance with Nutanix AHV placement policies—plus insights from eGroup on avoiding pitfalls and maximizing value.
This article originally appeared on Mike Dent’s blog. It has been republished with the author’s credit and consent.

Why VM Placement Matters
In a virtualized environment, how and where your virtual machines (VMs) run isn’t just a matter of resource availability. It’s a key part of your resiliency, performance, and compliance strategy. That’s where Affinity and Anti-Affinity policies come into play.
With Nutanix AHV, administrators gain granular control over VM placement through two types of rules:
- VM-Host Affinity Policies: Define where VMs should run in relation to specific physical hosts. These policies enforce where a VM can be hosted when you power it on or migrate it.
- VM-VM Anti-Affinity Policies: Ensure certain VMs are kept apart for availability or performance isolation. When a problem occurs with one host, these rules help prevent multiple critical VMs from going down together.
Here, we’ll discuss why and when to use these policies in Nutanix AHV. The next post will cover how to configure and validate each scenario.
(My next blog will cover step-by-step configuration and validation.)
Affinity vs. Anti-Affinity: What’s the Difference?
These policies allow you to strike a balance between performance, licensing, and fault tolerance. Used correctly, they can be a force multiplier for your availability strategy. Used carelessly, they may reduce flexibility or even prevent VMs from powering on during capacity constraints.
Policy Overview
Policy Type | Description | Example Use Case |
---|---|---|
Affinity | Binds VMs to specific hosts | Pin database servers for licensing compliance |
Anti-Affinity | Keeps VMs separated across different hosts to avoid single points of failure | Distribute domain controllers across multiple hosts |

Read more about Affinity and Anti-Affinity rules in Nutanix AHV in [Nutanix’s Best Practices Guide]

Real-World Use Cases
Affinity Rule Examples (Keep VMs Bound to Specific Hosts)
- Licensing Enforcement: For per-host licensed applications (e.g., SQL Server, Oracle), you can pin those VMs to licensed nodes using VM-Host Affinity rules.
- Performance Optimization: Keep high-traffic app tiers (web and app) on the same host to reduce east-west network latency.
- Hardware Dependency: Ensure GPU or specialized workloads only run on compatible hosts.
- Dedicated Host Pools: Isolate sensitive workloads (e.g., financial apps or regulated data) for security and audit needs.
Anti-Affinity Rule Examples (Keep VMs Apart)
- Multi-Tenant Isolation: Intentionally separate workloads for tenants or departments.
- Domain Controllers: Ensure AD availability by placing domain controllers on separate hosts.
- Clustered Applications: Distribute SQL Always On or clustered file servers across hosts for resiliency.
- Firewall or Load Balancer Pairs: Separate HA pairs (e.g., Cisco, Palo Alto) to keep secondary nodes online during host failures.
Benefits and Pitfalls of Affinity Policies
Affinity policies give administrators more control over workload placement, but must be balanced to avoid unintended constraints.
Benefits
- High Availability and Fault Domain Separation
- Performance Isolation for demanding workloads
- Licensing Optimization by pinning apps to licensed hosts
- Predictable Placement for audits and planning
Pitfalls
- Reduced Flexibility: Overuse can limit scheduler options.
- Complexity at Scale: Managing many rules increases admin burden.
- Risk of Conflict: Misconfiguration can block VM startups.
- Stranded Resources: Strict rules can strand compute capacity.


Where to Apply These Policies
Nutanix offers several configuration methods:
- Prism Element: VM-level policies, configured per VM.
- Prism Central: Category-based policies, ideal for scaling and DR workflows.
- ACLI/NCLI: CLI-driven options (required for VM-VM Anti-Affinity prior to AOS 7.0).
For multi-cluster and DR-focused environments, Prism Central provides the most consistent and scalable approach. VM-VM Anti-Affinity cannot be created directly in Prism Element.
Disaster Recovery Considerations
VM placement rules don’t always persist seamlessly during failover or failback.
Affinity Policies
- PC-based DR: Pre-create host and VM categories at the recovery site. Policies sync back automatically during failback.
- PD-based DR: VM-Host Affinity policies created in Prism Element are cleared. Manual recreation is required unless managed via Prism Central.
Anti-Affinity Policies
- ACLI-based or PD-based DR: These do not replicate and must be manually redefined after failover.
- PC-based DR: Category-based policies behave like Affinity policies; pre-create them for protected VMs.


Final Thoughts
Affinity and Anti-Affinity policies in Nutanix AHV are powerful tools to enhance resiliency, performance, and compliance when implemented with care.
At eGroup, we help organizations:
- Design policies that protect uptime without overcomplicating clusters
- Align VM placement with licensing and performance goals
- Simplify DR workflows for seamless failover and recovery
Start with your critical workloads, document your rules, and avoid over-engineering. Smart policy decisions lead to smarter placement and stronger outcomes.
- What’s Next?
Stay tuned for the next blog, where we’ll walk through the configuration and validation process step by step.
Build a Smarter, More Resilient Infrastructure
Looking to simplify your Nutanix environment and ensure your VMs are resilient, compliant, and cost-optimized?
