In a Multi NSX configuration, if one of the NSX instances registered with a VMware vCenter is removed, DVS switch associated with the removed NSX instance is not available for selection in the NSX UI.

Problem

To know whether the DVS associated to the NSX instance you removed is ready to be associated to another NSX instance, verify the status of the owner_nsx parameter. In the response, the owner_nsx parameter of the DVS did not reset. The value is Other. So, the DVS instance does not show up as an option when preparing NSX.

Run GET https://<nsx-manager-ip>/api/v1/fabric/compute-collections/<compute-collection-id>:domain-<id>
{
  "external_id" : "c39f2dea-fccd-4023-ab85-7e243a5dfee3:domain-c3633",
  "origin_type" : "VC_Cluster",
  "origin_id" : "c39f2dea-fccd-4023-ab85-7e243a5dfee3",
  "cm_local_id" : "domain-c3633",
  "owner_id" : "",
  "origin_properties" : [ {
    "key" : "lifecycleManaged",
    "value" : "false"
  }, {
    "key" : "dasConfig.enabled",
    "value" : "false"
  }, {
    "key" : "drsConfig.enabled",
    "value" : "false"
  }, {
    "key" : "drsConfig.defaultVmBehavior",
    "value" : "fullyAutomated"
  }, {
    "key" : "configManagerEnabled",
    "value" : "false"
  }, {
    "key" : "configurationEx.vsanConfigInfo.enabled",
    "value" : "false"
  } ],
  "owner_nsx" : "OTHER",    
  "resource_type" : "ComputeCollection",
  "display_name" : "a1",
  "description" : "",
  "_last_sync_time" : 1686185879004

The owner_nsx field is set to Other indicating it is still used by the NSX instance. And the DVS is not available for selection in the NSX UI.

Solution

  1. Go to the VMware vCenter, clean up DVS entries.
  2. Using VMware vCenter MOB UI interface, remove the custom field definition for the DVS managed object.
    For example, to delete dvs-1897 from the VMware vCenter MOB UI interface, you need to find the data center and the network folder where the DVS object exists.
    In the VMware vCenter MOB UI interface, go to content → group-d1 (datacenters) → datacenter-1695 (Data center) → group-n1699 (network folder) → more. Find the DVS folder, dvs-1897(DVS7N-EXT) → value [109] or customerValue[109].
  3. Navigate to CustomFieldsManager → RemoveCustomFieldDef and provide custom key integer value.
  4. Delete the DVS entry from the VMware vCenter and then retry to assign the same DVS from the NSX UI. After cleaning up the DVS entries in VMware vCenter, new NSX instances can use the DVS object that is deleted. Similarly, you can use the same DVS within a Transport Node Profile to configure clusters.