6.0

Table Of Contents
n
Datastore Cluster B has an inter-VM anti-affinity rule. When you move a virtual disk out of Datastore
Cluster A and into Datastore Cluster B, any rule that applied to the virtual disk for a given virtual
machine in Datastore Cluster A no longer applies. The virtual disk is now subject to the inter-VM anti-
affinity rule in Datastore Cluster B.
n
Datastore Cluster B has an intra-VM anti-affinity rule. When you move a virtual disk out of Datastore
Cluster A and into Datastore Cluster B, the intra-VM anti-affinity rule does not apply to the virtual disk
for a given virtual machine because the rule is limited to only specified virtual disks in Datastore
Cluster B.
NOTE Storage DRS rules might prevent a datastore from entering maintenance mode. You can choose to
ignore Storage DRS rules for maintenance mode by enabling the Ignore Affinity Rules for Maintenance
option.
Create Inter-VM Anti-Affinity Rules
You can create an anti-affinity rule to indicate that all virtual disks of certain virtual machines must be kept
on different datastores. The rule applies to individual datastore clusters.
Virtual machines that participate in an inter-VM anti-affinity rule in a datastore cluster must be associated
with an intra-VM affinity rule in the datastore cluster. The virtual machines must also comply with the
intra-VM affinity rule.
If a virtual machine is subject to an inter-VM anti-affinity rule, the following behavior applies:
n
Storage DRS places the virtual machine's virtual disks according to the rule.
n
Storage DRS migrates the virtual disks using vMotion according to the rule, even if the migration is for
a mandatory reason such as putting a datastore in maintenance mode.
n
If the virtual machine's virtual disk violates the rule, Storage DRS makes migration recommendations to
correct the error or reports the violation as a fault if it cannot make a recommendation that will correct
the error.
No inter-VM anti-affinity rules are defined by default.
Prerequisites
Launch the vSphere Client and log in to a vCenter Server system.
Procedure
1 In the vSphere Client inventory, right-click a datastore cluster and select Edit Settings.
2 In the left pane of the Edit Datastore Cluster dialog box, select Rules.
3 Click Add.
4 Type a name for the rule.
5 From the Type menu, select VM anti-affinity.
6 Click Add.
7 Click Select Virtual Machine.
8 Select at least two virtual machines and click OK.
9 Click OK to save the rule.
vSphere Administration with the vSphere Client
376 VMware, Inc.