Manage affinity rules

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:

CVM supports configuration of the association action in VM-VM affinity rules. The action can be one of the following:

VM-host affinity rules include the following types:

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 ensures load balancing in clusters.

Restrictions and guidelines

Assume that the difference between the numbers of hosts and failover hosts in the cluster is n.

Add an affinity rule

  1. From the left navigation pane, select Resources > Host Pool Name > Cluster Name.

  1. Click More, and then select Affinity Rules.

  1. On the page that opens, click Add.

  1. Configure the parameters as described in "Parameters."

  1. Click OK.

Modify an affinity rule

  1. From the left navigation pane, select Resources > Host Pool Name > Cluster Name.

  1. Click More, and then select Affinity Rules.

  1. Click the 2.png icon for the target rule.

  1. Configure the parameters as described in "Parameters."

  1. Click OK.

Delete an affinity rule

  1. From the left navigation pane, select Resources > Host Pool Name > Cluster Name.

  1. Click More, and then select Affinity Rules.

  1. Click the 10.png icon for the target affinity rule.

  1. In the dialog box that opens, click OK.

Parameters