New or scaled-out VCF Management Services and VCF Automation VMs are not automatically assigned to AZ1 DRS affinity rules on Stretched Clusters
search cancel

New or scaled-out VCF Management Services and VCF Automation VMs are not automatically assigned to AZ1 DRS affinity rules on Stretched Clusters

book

Article ID: 453860

calendar_today

Updated On:

Products

VCF Operations VCF Automation VMware vSphere ESXi

Issue/Introduction

On a VCF instance where the management cluster has been converted to a vSAN stretched cluster via the SDDC Manager Stretch Cluster workflow, VCF Services Runtime platform component VMs deployed or scaled out after the initial bring-up may be placed on secondary-site (AZ2) hosts, even though the cluster already has a DRS VM-Host affinity rule pinning management VMs to the primary site (AZ1).

Observed symptoms:

  • The Stretch Cluster workflow creates a DRS VM-Host affinity rule (commonly named sddc-manager_VMs should be on Primary Site) that pins the core management VMs present at that time to the primary-site host group (AZ1 hosts).
  • Any VCF Management Services and VCF Automation VMs created afterward by a Day-N deployment, lifecycle action, or cluster scale-out is not added to the VM group referenced by that rule.
  • DRS, running in fullyAutomated mode, is then free to place the new VM(s) anywhere in the cluster, including on secondary-site (AZ2) hosts.
  • In vCenter, the affected VM(s) appear registered on AZ2 hosts alongside other secondary-site workloads, with no corresponding VM-Host affinity rule protecting them.
  • No log entries, alerts, or reconciliation errors are generated for this condition — the deployment or scale-out completes successfully, with no indication that the new VM falls outside the primary-site affinity rule.

You may also recognize this issue by these symptoms:

  • A newly deployed or scaled-out VM is running on a different site/AZ than the rest of the management infrastructure.
  • A VM-Host affinity/DRS rule created by the Stretch Cluster workflow does not include all current management VMs as members of its VM group.
  • After adding a node or component, the cluster's primary-site VM group membership list does not grow to match.

Environment

  • VCF Management Services 9.1
  • VCF Management Services 9.1.1
  • VCF Automation 9.1
  • VCF Automation 9.1.1

Cause

The DRS VM-Host affinity rule created by the Stretch Cluster workflow pins only the management VMs that exist on the cluster at the time the rule is created to the primary-site (AZ1) VM group. Platform component VMs that are deployed or scaled out afterward — through a Day-N deployment, an LCM action, or a cluster scale-out — are not automatically added as members of that VM group. Because DRS, running in fullyAutomated mode, places any VM that is not covered by an affinity rule wherever it sees fit, these newer VMs can be scheduled onto secondary-site (AZ2) hosts.

This violates the VCF validated design, which requires management workloads to run on the primary site (AZ1) with no active workload on AZ2 during normal operations. If the secondary site fails, any unprotected platform VMs on AZ2 go down along with it — undermining the resilience the stretched-cluster design is meant to provide.

Resolution

Determining Whether You Are Affected

Do not wait for a site failure to find out whether you are exposed. Run this check any time, and always after a Day-N deployment, LCM action, or scale-out on a stretched management cluster, since the condition can recur with every such event:

  1. In the vSphere Client, go to the stretched cluster's Configure > Configuration > VM/Host Rules and open the rule that pins management VMs to the primary site (created by the Stretch Cluster workflow, commonly named sddc-manager_VMs should be on Primary Site).
    • Note its Cluster VM Group.
  2. Go to Configure > Configuration > VM/Host Rules and list the members of that VM group.
  3. Compare that member list against the full list of platform component VMs running on the cluster (visible in the vCenter inventory).
  4. If any platform VM is missing from the VM group's member list, it is not protected by the affinity rule — regardless of which host it happens to be running on right now — and should be remediated using the steps below.

 

Workaround

This patches the vsphere provider configuration on the root vsp component's package deployment (PD) through the VCF Services Runtime platform API, setting a vmGroup. This is the single component that governs where VCF Services Runtime places all of its own infrastructure VMs on vSphere (cluster, folder, network, resource pool, datastores, and now the VM group). Once applied, VCF Services Runtime moves its VMs into that VM group, which brings them under the existing Primary Site DRS affinity rule — this is a one-time change per cluster, not a per-component or per-VM operation.

 

Important:

  • Perform this only on clusters where the Stretch Cluster workflow has already run and the primary-site VM-Host affinity rule/group already exists.
  • This does not change the affinity rule itself — it only adds VCF Services Runtime's VMs to the VM group the rule already references.
  • The patch is applied once, against the vsp component only — not against platform or any other individual component.

 

Step 1: Identify the primary-site (AZ1) VM group name

In the vSphere Client:

  1. Navigate to the stretched cluster > Configure > Configuration > VM/Host Rules.
  2. Open the rule named sddc-manager_VMs should be on Primary Site (created by the Stretch Cluster workflow).
  3. Note the Cluster VM Group referenced by the rule — this is the primary AZ VM group name.


Step 2: Copy the remediation script to the control-plane node
To remediate the issue at hand, we require direct access to a control-plane node of the VCF Management Services Runtime cluster.

Follow the steps here to enable SSH access to the cluster: https://techdocs.broadcom.com/us/en/vmware-cis/vcf/vcf-9-0-and-later/9-1/fleet-management/configuring-management-components/enable-ssh-access-to-the-vcf-services-runtime-cluster.html

  1. Save the script below locally as set-primary-az-vmgroup.sh.
  2. From a machine that can reach the control-plane node, copy it to the home directory of vmware-system-user.
    • scp set-primary-az-vmgroup.sh vmware-system-user@<node-ip>:


Step 3: Connect to the control-plane node and run the script

  1. SSH to the control-plane node as vmware-system-user and elevate to root using the steps in the documentation above.
  2. Make the file executable
    • chmod +x /home/vmware-system-user/set-primary-az-vmgroup.sh
  3. Run the script with the VM group name from Step 1 and the platform FQDN as arguments.
    • The script prompts for the [email protected] password and performs the remaining steps: setting the kubeconfig, looking up the VSP Component ID, authenticating, reviewing the current vsphere provider configuration, applying the vmGroup change, and polling the apply task until it succeeds.
    • /home/vmware-system-user/set-primary-az-vmgroup.sh --vm-group "<Cluster VM Group>" --platform-fqdn "<PLATFORM_FQDN>"

 


Step 4: Verify VM placement

  1. In the same SSH session, confirm the component is healthy:
    • kubectl get co -l component.vmsp.vmware.com/type=vsp
      • # PHASE column should show Running
  2. In the vSphere Client, confirm all VCF Services Runtime-managed VMs (across every deployed component, not just the one that originally showed the symptom) now appear as members of <Cluster VM Group> (Configure > Configuration > VM/Host Groups).
  3. Confirm DRS has migrated (or will migrate) the VM(s) to a primary-site (AZ1) host, and that Monitor > vSphere DRS > Faults shows no affinity violations for these VMs.

Attachments

set-primary-az-vmgroup.sh get_app