Configure VM-VM or VM-host affinity rules to define the relationships among VMs and the relationships between VMs and hosts.
VM-VM affinity rules include the following types:
Keep VMs Together—VMs of the rule must reside on the same host.
Separate VMs—VMs of the rule must reside on different hosts.
Space Console 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.
VM-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. For example, when the Web server and a database are required to be located on the same host, you can configure a VM-VM affinity rule to gather VMs that provide the Web server and database services.
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 ensures load balancing in clusters. For example, when two compute-intensive service systems exist, configure a VM-VM affinity rule to distribute the VMs that accommodate the service systems to different compute nodes.
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, but cannot add a VM to both VM-VM and VM-host 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, but you can no longer add VM A to any VM-host affinity rules.
From the navigation pane, select Data Center > Virtualization > Cluster name.
Click More, and then select Affinity Rules.
Click Add.
Configure the parameters, and then click OK.
Type: Select an affinity rule type. Options include the following:
Keep VMs Together—VMs restricted by the affinity rule must reside on the same host.
Separate VMs—VMs restricted by the affinity rule must reside on different hosts.
VMs to Hosts—Configure a VM-host affinity rule.
Configure the following parameters if the rule type is Keep VMs Together or Separate VMs.
Related Action: Select the action to take on VMs restricted by the affinity rule.
VM List: Select the VMs to be restricted by the affinity rule.
Configure the following parameters if the rule type is VMs to Hosts.
VM Group: Select a VM group for the affinity rule.
Relationship: Select the relationship between VMs in the selected VM group and hosts in the selected host group.
From the navigation pane, select Data Center > Virtualization > Cluster name.
Click More, and then select Affinity Rules.
Click Edit for an affinity rule.
Edit the parameters, and then click OK.
From the navigation pane, select Data Center > Virtualization > Cluster name.
Click More, and then select Affinity Rules.
Click Delete for an affinity rule