Workaround 1:
Currently only removing the last uplink in the array is supported.
Example 1:
If we have the following uplink to vmnic mapping:
Uplink1 - vmnic1
Uplink2 - vmnic2
Uplink3 - free
Uplink4 - free
Removing Uplink3 and Uplink4 from the VDS on VC UI is OK and will not have any problems.
Example 2:
If we have the following uplink to vmnic mapping:
Uplink1 - free
Uplink2 - free
Uplink3 - vmnic1
Uplink4 - vmnic2
First move vmnic1 and vmnic2 to Uplink1 and Uplink2, and then remove Uplink3 and Uplink4 from the VDS on VC UI.
Workaround 2:
- If Workaround 1 is performed but the uplink delete operation still fails with the resource in use error it may be due to reordering that occurred between the uplink array and port array, which are two independent arrays.
- The port array order cannot be manipulated until vCenter 9.0 which includes a database design change to this arrary.
- In this case, it can be worked around by creating a new VDS with the desired uplink configuration and then networking can be migrated to the new VDS.
OR
- Instead of creating a new VDS, you can perform the following steps to make changes on existing DVS.
- Create a temporary Standard Switch (vSS) on the affected ESXi hosts.
- Migrate the active physical uplinks (e.g., vmnic1 on uplink1) and VMkernel adapters from the DVS to the vSS and repeat the same steps for (e.g., vmnic2 on uplink2).
- Once the all the VM traffic is moved to VSS and validate there are no no active traffic on the impacted DVS then navigate to VDS > Configure > Settings > Edit Settings > Uplinks and remove the uplinks to be to removed eg. Uplink3 and Uplink4.
- Migrate the physical adapters and VMkernel networking back to the DVS. Ensure
- Delete the temporary vSS
Refer : Migrate Network Adapters on a Host to a vSphere Distributed Switch