Cluster Creation Fails on imported Workload Domain in SDDC Manager with Error: "Failed to validate host selection: Invalid Parameter: hostsOnly=true, skipHostSwitchValidation=false"
search cancel

Cluster Creation Fails on imported Workload Domain in SDDC Manager with Error: "Failed to validate host selection: Invalid Parameter: hostsOnly=true, skipHostSwitchValidation=false"

book

Article ID: 420375

calendar_today

Updated On:

Products

VMware SDDC Manager

Issue/Introduction

Cluster creation on an existing Workload Domain fails with the following error:

When trying to add a new cluster to an imported WLD the SDDC Manager displays a red banner on step 4 "Switch Configuration":

Failed to validate host selection: Invalid Parameter: hostsOnly=true, skipHostSwitchValidation=false
(Provided the VDS configuration is applied to the hosts in the cluster.)

In /var/log/vmware/vcf/domainmanager/domainmanager.log an error can be seen: 

Error reading inventory for NSX transport zones information for domain 45554.....

No default cluster found for domain   :   45554........

 

Environment

VMware Cloud Foundation 5.x

Cause

Due to the Workload domain being imported earlier to VCF, no cluster was marked as default to that Workload domain thus failing the workflow.

Resolution

Note: This is a destructive operation. Please ensure that all necessary backups and snapshots are taken prior to proceeding with the steps below to avoid any issue.To be able to add a new cluster to a Workload Domain, we have to set another cluster in the Workload Domain as default, so that the required cluster can be successfully created. 

  1. Take a snapshot of the SDDC Manager VM
  2. Note the name of one existing cluster for the affected Workload Domain.
  3. SSH into the SDDC Manager VM with the vcf user, then elevate to root (su root)
  4. Connect to the SDDC Manager platform DB:
    • VCF < 5.x : psql -h localhost -U postgres -d platform
      VCF >=5.x : /usr/pgsql/13/bin/psql -h localhost -U postgres -d platform
  5. Select * from cluster;
    Please check if none of the clusters for the affected Workload Domain are marked with 't' for column is_default
  6. Select * from cluster where name='<clusterNameFromStep2>';
    Make sure the command returns with one single record and validate is_default is false: "f"
  7. To update a cluster to be the default cluster run the following update command:  
    update cluster set is_default='t' where name='<clusterNameFromStep2>'; 
  8. Exit database 
    •  \q
  9. Restart the domainmanager service
    systemctl restart domainmanager 
  10. Attempt the Cluster creation workflow from the SDDC Manager UI.

If you require assistance with this activity, please log a case through the Broadcom Support Portal to engage a Technical Support Engineer (TSE). Ensure that a snapshot of the SDDC Manager VM is taken beforehand, and reference this Knowledge Base (KB) article when submitting the case to support.