2V0-21-23 practice question 2 of 25

An administrator needs to create affinity rules for the following vSphere cluster setup: • The cluster contains two virtual machines (VMs) named…

Full set: 107 questions
An administrator needs to create affinity rules for the following vSphere cluster setup: • The cluster contains two virtual machines (VMs) named app01 and app02. • The cluster contains six hosts named esx11 through esx16. • The app01 and app02 VMs run software that is licensed to run only on esx11, esx12, or esx13. • vSphere Distributed Resource Scheduler (DRS) is configured Which set of steps must the administrator perform to ensure that the licensing requirements are met for app01 and app02?
Answer options
A: 1. Add all the hosts to a host group. 2. Create a VM-VM anti-affinity rule for app01 and app02
B: 1. Add the esx11 - esx13 hosts to a host group 2. Create a VM-VM affinity rule for app01 and app02
C: 1 Add the VMs to a VM group and the esx11 - esx13 hosts to a host group. 2 Create a VM-Host required rule between the VM group and the host group. Correct answer
D: 1. Add the VMs to a VM group and the esx11 - esx13 hosts to a host group. 2. Create a VM-Host preferential rule between the VM group and the host group
Correct Answer:
C. 1 Add the VMs to a VM group and the esx11 - esx13 hosts to a host group. 2 Create a VM-Host required rule between the VM group and the host group.
Explanation

The scenario describes a strict software licensing requirement where the virtual machines app01 and app02 are permitted to run only on a specific subset of hosts (esx11, esx12, esx13). This requires a mandatory, or "hard," affinity rule. The correct procedure is to first group the relevant objects: create a VM group for app01 and app02, and a host group for esx11, esx12, and esx13. Then, a "required" (must run on) VM-Host affinity rule must be created to bind the VM group to the host group. This ensures that vSphere DRS will never place or migrate these VMs to any hosts outside the specified group, thereby enforcing the licensing constraint.

Why Incorrect

A. This is incorrect because it groups all hosts, not just the licensed ones, and a VM-VM anti-affinity rule only separates VMs from each other; it does not restrict them to specific hosts.
B. A VM-VM affinity rule attempts to keep the specified VMs on the same host. This does not address the core requirement of restricting the VMs to a specific group of licensed hosts.
D. A "preferential" (should run on) rule is a soft constraint. DRS will try to keep the VMs on the specified hosts but can move them to other hosts (e.g., esx14) if necessary, which would violate the strict licensing terms.

References

1. VMware vSphere Documentation (vSphere 8.0)

vSphere Resource Management

"VM-Host Affinity Rules".

The documentation states

"A required rule (designated by 'must') specifies that the virtual machines in a VM group can run only on the hosts in the associated host group... Required rules are useful for licensing and compliance purposes." This directly supports the use of a required rule for licensing scenarios.

2. VMware vSphere Documentation (vSphere 8.0)

vSphere Resource Management

"Create a VM-Host Affinity Rule".

Step 4 of the procedure outlines creating the VM and Host groups. Step 6 details selecting the rule type

where the options are "Must run on hosts in group" (required) and "Should run on hosts in group" (preferential). This confirms the two-step process described in the correct answer.

3. VMware vSphere Documentation (vSphere 7.0)

vSphere Resource Management

"Using Affinity Rules".

This guide explains

"VM-Host affinity rules are useful for virtual machines that must run on hosts with specific configurations for licensing or hardware requirements." It further clarifies that "must" rules are mandatory

while "should" rules are preferential

reinforcing that a strict licensing requirement mandates a "must" or "required" rule.

Scroll to Top