This article is required to allow users to understand what this warning means and how to remediate from it.
Symptoms:
Workload domain, cluster and host removal operations could throw a warning that says: "Due to the failure to remove VMknic [..] from ESXi Host [..], the following IP address [..] will not be released from the network pool to avoid possible IP conflicts."
This warning is thrown at task at task "Remove vmknic(s) from ESXi Hosts" with error code: "NOT_RELEASED_IP_ADDRESS_DUE_TO_FAILED_VMKNIC_REMOVAL".
VMware Cloud Foundation 4.5
VMware Cloud Foundation 5.0
VMware Cloud Foundation 5.0.0.1
To recover from this state, follow the below steps:
1. Remove the VMknics address that was not removed. This can be achieved with:
2. After the VMKnics are removed from the hosts, release the IP addresses so they can be used again from the network pool. This should be directly changed in the DB with the following commands:
The database command that will update the used IP address table by removing the desired IP:
UPDATE vcf_network SET used_ip_addresses='[<comma-separated-ip-values-used-updated>]' WHERE id ='<network-id>';
The database command that will update the free IP address table by adding the desired IP:
UPDATE vcf_network SET free_ip_addresses='[<comma-separated-ip-values-free-updated>]' WHERE id ='<network-id>';
The information about the network ID and the already existing IP addresses in the free and used tables could be retrieved with:
select * from vcf_network;
Also, it is important to make sure that the affected IP address is not used anywhere because moving the IP from used to free list, will make it available for usage by other operations. If the IP is not actually available, this will lead to IP duplication issues.