I am unable to delete an IP pool because it says there's an IP address in use. Well, there are no VMs using this IP address, so not sure how I can remove it.
Tried restarting the manager and all my controllers.
Thoughts?
If you go to the IP Pools list what do you see under the user/total tab?
This happens a lot, maybe you can go stright forward and delete the asigments using an API call:
Use the NSX API documenation for reference:
https://docs.vmware.com/en/VMware-NSX-for-vSphere/6.3/nsx_63_api.pdf
STEPS: (Maybe something changed with newest versions but should be easy to adapt)
1- Configure Postman to use basic authentication when accessing the NSX REST API.
2- Configure Postman to accept XML in return by adding a request header: Content-Type: application/xml
3- Get the list of IP pools to find the appropriate IP pool ID
https://%NSXMANAGER%/api/2.0/services/ipam/pools/scope/globalroot-0
Output will be similar to:
ipaddresspool-1
The objectId parameter is what is needed to delete a specific reserved IP from the IP pool.
4. Delete the IP reservation from the pool. In my case this was 192.168.60.10.
https://%NSXMANAGER%/api/2.0/services/ipam/pools/ipaddresspool-1/ipaddresses/%IPADD%
Output will be similar to:
true
The IP address reservation has now been removed from the IP pool.
EDIT= This guide may help
https://vswitchzero.com/2017/08/31/removing-stale-ip-pool-assignments-in-nsx/
If you go to the IP Pools list what do you see under the user/total tab?
This happens a lot, maybe you can go stright forward and delete the asigments using an API call:
Use the NSX API documenation for reference:
https://docs.vmware.com/en/VMware-NSX-for-vSphere/6.3/nsx_63_api.pdf
STEPS: (Maybe something changed with newest versions but should be easy to adapt)
1- Configure Postman to use basic authentication when accessing the NSX REST API.
2- Configure Postman to accept XML in return by adding a request header: Content-Type: application/xml
3- Get the list of IP pools to find the appropriate IP pool ID
https://%NSXMANAGER%/api/2.0/services/ipam/pools/scope/globalroot-0
Output will be similar to:
ipaddresspool-1
The objectId parameter is what is needed to delete a specific reserved IP from the IP pool.
4. Delete the IP reservation from the pool. In my case this was 192.168.60.10.
https://%NSXMANAGER%/api/2.0/services/ipam/pools/ipaddresspool-1/ipaddresses/%IPADD%
Output will be similar to:
true
The IP address reservation has now been removed from the IP pool.
EDIT= This guide may help
https://vswitchzero.com/2017/08/31/removing-stale-ip-pool-assignments-in-nsx/
is it possible that the ESXi host vTEPs are using IP's from that pool?
You can check on the esxi host vmkernels