NSX-T: Find and Delete Orphaned Ports


Summary:

Basically had a bunch of orphaned ports (65000+), don't know why or how it happened (hypothetically NTP related), but needed to clean them up.  Doing it via UI was obviously not an option as it would only return 50 ports per page at a time.  Oh and it wouldn't refresh after every delete.

Details:

I'm saying 'orphaned', but in reality I'm only keying off the idea that the port is reporting "Operationally Down".  This could simply be a powered off VM, but there is little harm in deleting these type of ports as they will simply be recreated if that VM were to be powered up.  

This may not apply in all situations, so use this with caution.

Powershell Example(s):


References:

https://www.virten.net/2021/03/error-when-connecting-virtual-machine-to-nsx-t-segments/

Comments

Popular posts from this blog

NSX-T: Release associated invalid node ID from certificate

Azure VMware Solution: NSX-T Active/Active T0 Edges...but

NSX-T: vCenter and NSX-T Inventory out of Sync (Hosts in vSphere not showing up in NSX-T)