Unable to Delete a Logical switch attached to Transport zone from NSX manager 2.3.1.0 GUI OR through API request.
search cancel

Unable to Delete a Logical switch attached to Transport zone from NSX manager 2.3.1.0 GUI OR through API request.

book

Article ID: 325715

calendar_today

Updated On:

Products

VMware NSX Networking

Issue/Introduction

Symptoms:
-  Attempt to delete an NSX-T 2.3 logical switch fails with an error similar to the following:

Logical switch delete failed: One or more relationships exist for object with id Logical Switch/d6ec54f9-71ee-4164-a134-95c7d16d833d. (Error code: 3022)



- The Logical Switch has no logical ports, ESXi Bridge Clusters, ESXi Bridge Profiles nor DCHP servers attached.

Environment

VMware NSX-T Data Center 2.x
VMware NSX-T Data Center

Cause

- Possible cause of this error is that Logical switch that you are trying to delete is either applied to IPFIX Switch Profile or IPFIX DFW Profile under Tools>IPFIX section. When there is a vRNI IPFIX profile in the NSX-T configuration, the logical switches are added to the profile automatically after 10 or 15 minutes:

"All the logical switches present in NSX-T are appended in the IPFIX profile within 10-15 minutes."

- Also if the logical switch is selected and used in DFW, Edge Firewall rule or FW Exclusion list you will see the error mentioned above.
This same use case and error is applicable for Logical Port and NS groups.




Resolution

Remove the affected logical switch from the IPFIX profile:

- Go to Networking /  Switching / Click on the affected logical switch / Click on Overview

- Copy the ID of the switch, the ID looks similar to this:

   aea74e40-b8ab-4767-96e4-cdc5aff1ff2e

- On the main panel (left side), click on search and paste the ID of the logical switch. This will return all of the objects associated to it.



- Detach the logical switch from the profile.

- The attempt to delete the logical switch should be successful at this point.