The vCloud Director network IP pool has reached full consumption preventing new assignments
Although some IP addresses appear to be free, they are currently unavailable for use within the environment
Environment
VMware Cloud Director 10.3
Cause
A discrepancy has been identified between the IP addresses listed in the Allocated_ip_address table and those visible in the VCD Tenant IP list within the GUI
This issue typically arises when virtual machines are deleted, but their associated IP addresses are not properly released
The IP state is set to 4, which indicates that the interface has been deleted and the IP address should be returned to the pool but the IP remains marked as used, leading to a fully consumed pool despite the presence of seemingly available addresses.
Resolution
To resolve this issue, the IP address entries that are no longer in use must be removed from the Allocated_ip_address table in the VCD database. Follow the steps below:
Examine the table in the VCD database to identify IP addresses that are no longer in use (state = 4) and take note of the scope_id
SELECT * FROM Allocated_ip_address WHERE address='ANY_IP_FROM_IP_POOL';
Using the retrieved scope ID, review all related IP addresses within that pool:
SELECT * FROM Allocated_ip_address WHERE scope_id='########-####-####-####-############' ORDER BY (address);
From the results, identify IP addresses that are marked with state = 4 (indicating the interface has been deleted and the IP should be returned to the pool).
Remove the stale IP addresses from the table using their IDs:
DELETE FROM Allocated_ip_address WHERE id ='########-####-####-####-############';