Wednesday, 2 July 2014

Missing logical switch in NSX GUI

I've been playing around with NSX recently in my nested lab and somehow I've managed to create a logical switch that's configured somewhere but missing form the GUI as per the screenshots below.  As you can see, my transport zone has one logical switch assigned to it:


When you go to view the logical switches it says that the list is empty:


When querying the controller VM through the CLI I can see that VNI 5002 is assigned to something:


And also when creating an NSX Edge I can see the logical switch appear there as well:


Anyone have any ideas on how to remove the logical switch via CLI as I can't seem to find any commands to do this?  I've tried rebooting both NSX Manager and the controller VM but no joy.  Once I find this out I'll update this post.

** UPDATE **

Since I can't find any way to delete this logical switch via the GUI or even CLI I thought I'd try the API.  When running the following GET command against the NSX Controller I still can't find that phantom logical switch:

GET https://10.1.2.41/api/2.0/vdn/scopes/vdnscope-3/virtualwires


As recommended by Geordy Korte (Blog | Twitter) in this VMware Communities post I tried forcing a sync via NSX Manager with no success:


I also tried rebooting the entire lab which included hosts, vCenter, NSX Manager and controllers.

** RESOLUTION **

First of all a big thanks go out to Dmitri Kalintsev (Blog | Twitter) for spending around an hour with me going through various troubleshooting techniques to get to the bottom of it.  Ultimately the issue was caused due to only having one NSX controller.  Basically I issued a delete command on the logical switch, the NSX controller deleted it from it's database and the hosts and then tried to delete it from the NSX controller which wasn't quite ready as I had just rebooted it.  If I had the recommended three controller VM's as per best practice this would not have happened.  So, how did Dmitir help me resolve this, well it's quite clever when you think about it.

First he asked me to change the controller plane of the Transport Zone from Unicast to Multicast but I first had to add Multicast IP addresses into the segment ID as per below:


I then changed the control plane to Unicast ensuring that I ticked the option to Migrate existing Logical Switches to the new control plane:


I then deleted and re-provisioned a new NSX controller and then when that was fully up and running, changed the Transport Zone back to Unicast remembering to tick the option to migrate existing logical switches and removed the multicast IP addresses from the segment ID:


Once this was performed the logical switch re-appeared:


Once again, big thanks to Dmitri and everyone else who helped out.  Hopefully this will help people who want to learn NSX and only use one NSX controller VM in their lab.

No comments:

Post a Comment