Virtual Southwest
  • Blog
  • About
  • Presentations

More API fun with VMware NSX - Disable Distributed Firewall

9/13/2017

 
If you have tried to disable the Distributed Firewall on one of your host clusters, and found that even when selecting Disable it still shows Enabled,  there is a know issue and documented in this VMware KB 
​
The KB details the workaround to disable the Distributed Firewall with the API call to the NSX Manager-
Method: PUT URL: https://nsxmgr-ip/api/4.0/firewall/domainID/enable/true|false
​
Note: Replace the domainID field with the Cluster ID of the cluster which has the firewall disabled.
So, how to find your cluster ID you need??  Most of the documents have you go to the Management Object Browser (MOB), of your vCenter, then drill down to locate the specific item you need and it's associated ID.

​However, there is a quicker way.  If you log into the web client of your vCenter, (and yes all new features like NSX, vSan and many others can only be done in the web client),  you can locate the object ID for many items!
Just click on the item you need, such as the Cluster, then in the address bar of your browser, scroll all the way to the right, and the ID will be listed close to the end.
Here is an example of the cluster and ID needed:​
Picture
I used this trick during my VCIX-NV exam, which has one API question, and was able to find the ID required for a specific VM and then build my API query needed.  I was able to pass the exam so I hope I got that question correct at least!
​

Comments are closed.
    View my profile on LinkedIn
    Follow @virtsouthwest

    RSS Feed

    Archives

    December 2024
    October 2024
    August 2024
    September 2023
    September 2022
    June 2022
    August 2021
    December 2019
    September 2019
    January 2019
    August 2018
    June 2018
    October 2017
    September 2017
    March 2017
    September 2016
    February 2016
    November 2015
    March 2015
    May 2014
    January 2014
    July 2013
    April 2013
    December 2012
    September 2012
    August 2012
    July 2012
    June 2012

[email protected]