VM-VM and host affinity rules define the relationships among VMs and the relationships between VMs and hosts.
VM-VM affinity rules include the following types:
Gather VMs—VMs of the rule must reside on the same host.
Distribute VMs—VMs of the rule must reside on different hosts.
UIS Manager supports configuration of the association action in VM-VM affinity rules. The action can be one of the following:
None.
Start—When a VM restricted by the affinity rule starts, all the other VMs restricted by the same affinity rule will be started at the same time.
Shut Down—When a VM restricted by the affinity rule shuts down, all the other VMs restricted by the same affinity rule will be shut down at the same time.
Start/Shut Down—When a VM restricted by the affinity rule starts or shuts down, all the other VMs restricted by the same affinity rule will be started or shut down at the same time.
Host affinity rules include the following types:
Must Run on Hosts in This Group—VMs in the VM group must run on hosts in the host group.
Should Run on Hosts in This Group—VMs in the VM group should (not must) run on hosts in the host group.
Must Run on Hosts in Other Groups—VMs in the VM group must not run on hosts in the host group.
Should Run on Hosts in Other Groups—VMs in the VM group should (not must) not run on hosts in the host group.
A VM-VM affinity rule for gathering VMs is applicable to service systems that have frequent data exchange and require VMs to run on the same host.
A VM-VM affinity rule for distributing VMs is applicable to environments that consume a large number of host resources, such as CPUs and memory. Distributing VMs to different hosts can ensure load balancing in clusters.
Affinity rules might cause the failover host and DRS algorithms to be more complicated. Use affinity rules with caution.
You can add a VM to multiple non-conflicting VM-VM affinity rules. For example, you can configure a VM-VM affinity rule to require VM A and VM B to reside on the same host, and configure another VM-VM affinity rule to require VM A and VM C to reside on different hosts.
On the top navigation bar, click Hosts, and then select Cluster Management > Affinity Rules > VM-VM/Host Rules.
Click Add.
Configure the rule parameters as described in "Parameters."
Click OK.
On the top navigation bar, click Hosts, and then select Cluster Management > Affinity Rules > VM-VM/Host Rules.
Edit the rule parameters as described in "Parameters."
Click OK.
On the top navigation bar, click Hosts, and then select Cluster Management > Affinity Rules > VM-VM/Host Rules.
In the dialog box that opens, click OK.
Type: Type of the affinity rule.
Gather VMs—VMs of the rule must reside on the same host.
Distribute VMs—VMs of the rule must reside on different hosts.
Assign VMs to Hosts—Host affinity rule.
You must set the following parameters if the rule type is Gather VMs or Distribute VMs.
Associated Action: Select the action to take on VMs restricted by the affinity rule.
VM Group: Select a VM group.
You must set the following parameters if the rule type is Assign VMs to Hosts.
VM Group: Select a VM group.
Association: Select the relationship between VMs in the selected VM group and hosts in the selected host group.