When creating a new workload domain with shared NSX from the SDDC Manager it fails with the error "Failed to validate domain spec".
Domain manager logs reports log entries similar to:
/var/log/vmware/vcf/domainmanager/domainmanager.log:yyyy-dd-mmThh:mm:ss ERROR [vcf_dm,####,19a1] [c.v.e.s.e.h.LocalizableRuntimeExceptionHandler,http-nio-127.0.0.1-7200-exec-2] [Token ID] PUBLIC_DOMAINSPEC_VALIDATION_FAILED Failed to validate domain specyyyy-dd-mmThh:mm:ss DEBUG [vcf_dm,####,19a1] [c.v.e.s.e.h.LocalizableRuntimeExceptionHandler,http-nio-127.0.0.1-7200-exec-2] Handler Error Response: {"errorCode":"PUBLIC_DOMAINSPEC_VALIDATION_FAILED","arguments":[],"message":"Failed to validate domain spec","nestedErrors":[{"errorCode":"INCOMPATIBLE_SHARING_OF_NSX_FOR_NON_ISOLATED_WLD","arguments":["#####","[#####]"],"message":"NSX ##### be shared as it is used by other incompatible domains [#####]. NSX can be shared only between non-Isolated WLDs. Please provide a new NSX spec."}],"referenceToken":"TOKEN ID"}
VMware Cloud Foundation 5.x
In domain table of Platform database, the field 'is_management_sso_domain' set to 'f' (as in false) for the affected Workload Domain.
An example output is similar to;
[/home/vcf ]# psql -h localhost -U postgres -d platform -c "\x" -c "select id,status,type,name,is_management_sso_domain from domain"
-[ RECORD 1 ]------------+-------------------------------------id | ####-#####status | ACTIVEtype | VIname | example-WLD-Nameis_management_sso_domain | f-[ RECORD 2 ]------------+-------------------------------------id | ####-#####status | ACTIVEtype | MANAGEMENTname | example-MGMT-Nameis_management_sso_domain | t
Do not proceed without taking a backup (snapshot) of the SDDC Manager VM before making changes in the SDDC DB.
vcf user, then switch to the root user by running the command: su -is_management_sso_domain' field is set to 'f' (as in false) by running the command: psql -h localhost -U postgres -d platform -c "\x" -c "select id,status,type,name,is_management_sso_domain from domain"
An output of the command shows similar to:
[ /home/vcf ]# psql -h localhost -U postgres -d platform -c "\x" -c "select id,status,type,name,is_management_sso_domain from domain"
-[ RECORD 1 ]------------+-------------------------------------id | ####-#####status | ACTIVEtype | VIname | example-WLD-Nameis_management_sso_domain | f-[ RECORD 2 ]------------+-------------------------------------id | ####-#####status | ACTIVEtype | MANAGEMENTname | example-MGMT-Nameis_management_sso_domain | t
is_management_sso_domain' field by referencing the id corresponding to the affected WLD id. Cross reference the WLD id from the error log snippets.Example command is similar to: /usr/pgsql/13/bin/psql -h localhost -U postgres -d platform -c "update domain set is_management_sso_domain ='t' where id = '<id from step#2 where is_management_sso_domain is f> "