Affichage des articles dont le libellé est Create. Afficher tous les articles
Affichage des articles dont le libellé est Create. Afficher tous les articles
DRS affinity rules are used in DRS clusters to keep certain VMs together on the same host. You can create them using vSphere Web Client:

1. Select your cluster from the inventory, go to Manage > Settings > DRS Rules, and click the Add button:

2. The Create DRS Rule window opens. Type the name for the rule and choose the rule type. In this example, we will create a rule that will keep two VMs on the same host. Click Add to add the VMs:

add drs rules vms

3. Select the VMs you would like to run on the same host and click OK:

add drs rules same host

4. Click OK to create the rule.

To test the rule, select your DRS cluster from the inventory and go to Monitor > vSphere DRS. Because the VMs we’ve selected during the rule creation are running on different ESXi hosts, DRS recommends to run them on the same host:

drs same host recommendation

DRS anti-affinity rules are used in DRS clusters to keep certain VMs on separate hosts. You can create them using vSphere Web Client:

1. Select your cluster from the inventory, go to Manage > Settings > DRS Rules, and click the Add button:

2. The Create DRS Rule window opens. Type the name for the rule and choose the rule type. In this example, we will create a rule that will keep two VMs on separate hosts. Click Add to add the VMs:

drs anti affinity rule

3. Select the VMs you would like to run on different hosts and click OK:

vms for drs rule

4. Click OK to create the rule.

To test the rule, select your DRS cluster from the inventory and go to Monitor > vSphere DRS. Because the VMs we’ve selected during the rule creation are running on the same ESXi host, DRS recommends to run them on different hosts:

drs apply anti affinity rule

DRS VM to host rules are used in DRS clusters to specify whether VMs can or can’t be run on a host. These rules are used in conjunction with DRS groups for ease of administration. A DRS group can either consist of one or more VMs or one or more ESXi hosts.

You can create DRS groups using vSphere Web Client:

1. Select your DRS cluster in the inventory, go to Manage > Settings > DRS Groups, and click the Add button:

2. The Create DRS Group window opens. First, we will create a VM DRS group. Type the name for the group, select VM DRS Group as the group type, and click the Add button:

vm drs group

3. Select one or more VMs and click OK:

add vm drs group

4. Click OK to create the group.

5. Next, we need to create a Host DRS group. In the DRS Groups panel, click Add:

drs add another group

6. Type the name for the group, select Host DRS Group as the group type, and click the Add button:

host drs group

7. Select one ore more ESXi hosts and click OK:

host drs group hosts

8. Click OK to create the group.

After you’ve created DRS groups, you can create a VM to host rule using vSphere Web Client:

1. Select your cluster from the inventory, go to Manage > Settings > DRS Rules, and click the Add button:

add drs rules

2. The Create DRS Rule window opens. Type the name for the rule and choose the rule type. In this example, we will create a rule that will keep a VM on a specific host, so select the Virtual Machines to Hosts type. We will also select the DRS VM Group and the DRS Host Group we’ve created in the previous step and select the Must run on hosts in group option:

create VM to host rule

The rule we’ve created will force the VM from the group VM DRS Example Group (Linux-VM) to run on the host from the Host DRS Example Group (192.168.5.116). We can test this by selecting our cluster and going to Monitor > vSphere DRS. Because our VM is currently running on a different host, DRS will recommend to migrate Linux-VM to 192.168.5.116:

drs vm to hosts recommendation