Configure affinity rules

About 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:

Space Console 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:

Application scenarios

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.

Restrictions and guidelines

Add an affinity rule

Procedure

  1. From the navigation pane, select Data Center > Virtualization > Cluster name.

  1. Click More, and then select Affinity Rules.

  1. Click Add.

  1. Configure the parameters, and then click OK.

Parameters

Configure the following parameters if the rule type is Keep VMs Together or Separate VMs.

Configure the following parameters if the rule type is VMs to Hosts.

Manage affinity rules

Edit an affinity rule

  1. From the navigation pane, select Data Center > Virtualization > Cluster name.

  1. Click More, and then select Affinity Rules.

  1. Click Edit for an affinity rule.

  1. Edit the parameters, and then click OK.

Delete an affinity rule

  1. From the navigation pane, select Data Center > Virtualization > Cluster name.

  1. Click More, and then select Affinity Rules.

  1. Click Delete for an affinity rule

  1. Click OK.