Removing Stuck NSX Controller using API Calls

So, its been a while i have written anything. Got so many projects in line waiting for their turn. So, blogs will be much more regular from now on, now that life is sorted out and back on old track we are. Now, without wasting any time let’s get started with our first blog of season.

Problem Statement:

I was playing around with my NSX lab, when i decided to delete everything and start everything from scratch. So cleaned up environment and started deleting my controllers one by one. Out of 3, two controllers were removed successfully, but last controller got stuck on removing stage.

I restarted NSX manager, services, and vCenter without any success.


This is where NSX API calls saved me. So, let’s see the solution step by step.

  • Use any API client to connect to NSX API console. In my example i was using Postman.
  • Use Basic Authentication and provide admin username and password.
  • Type below in address bar and use GET Method.
 GET https://NSX-Manager-IP-Address/api/2.0/vdn/controller
  • Note down controller ID from response provided above.
  • Type below command in address bar to delete controller forcefully from NSX manager.
DELETE https://NSX-Manager-IP-Address/api/2.0/vdn/controller/controllerId?forceRemoval=true
  • Refresh vSphere Web Client and voila it worked. Ready for redeploying again. 🙂

Reference Guide:

Click to access nsx_62_api.pdf

I hope you like this post. Any questions or queries, please let me know.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.