I had an IP Pool of 5 addresses all of which were allocated to my 5 ESXi hosts. I then screwed up the VTEP vmkernel port on one of the ESXi hosts. I was only able to correct it by adding another IP to the IP Pool range of addresses and then Forcing a Synch. Now I have an IP Pool that show 6 of 6 IP addresses allocated when in reality I only have 5 of 6 allocated to ESXi hosts. Is there any way for me to reclaim the 6th IP address in the pool that is still showing Allocated?
OK, I have a REST client installed and looking at the API Guide you provided it looks pretty straight forward, My only remaining question is how to determine the "pool-id" that's required in the command line. Do you know where I can find the "pool-id"?
Just for the public I am putting it here as well:
run a GET in REST client on
This will give you the list of pools defined on the manager.
The commands you provided worked perfect. My IP Pool in NSX Manager now says 5 of 6 allocated. At first it still wasn't obvious what the pool-id was after running the command https://<nsxmgr-ip>/api/2.0/services/ipam/pools/scope/globalroot-0. However, under <ipamAddressPools><ipamAddressPool> is <objectId> and its that objectid that is the pool-id needed for the command https://<nsxmgr-ip>/api/2.0/services/ipam/pools/<pool-id>/ipaddresses/<ipaddress>
I know it's pretty old post but when I read this thought of adding some additional details:
First get the details using : https://<nsx-mgr>/api/2.0//services/ipam/pools/scope/globalroot-0
Sample output is:
?xml version="1.0" encoding="UTF-8"?>
Now you have required values like pool ID : ipaddresspool-2
Replace the NSXMANAGER & ACTUALIPVALUE based on your Infrastructure values -->