Power-on operations for a virtual machine fail with the following error message:
"The following IP/MAC addresses have already been used by running virtual machines"
VMware Cloud Director 10.x
Stale network interface (NIC) data remains in the database for a virtual machine within the vApp, causing IP and MAC address conflict checks to fail during power-on operations. This conflict check evaluates all virtual machines belonging to the vApp, including those not currently being powered on.
Execute the resolution steps provided in The following IP/MAC addresses have already been used by running virtual machines.
If the issue persists after following above KB, take a full database backup and snapshot all VMware Cloud Director cells before proceeding with direct database modifications.
select * from vapp_vm where name like '%<VM_name>%';
3. Fetch the NIC details for the VM using the NVM ID obtained in step 1:
select * from network_interface where netvm_id = '<nvm_id>';
4. Delete the conflicting NIC entry executing the following query with the identified nic id obtained from above query:
delete from network_interface where nic_id = '<nic_id>';
5. Validate the NIC cleanup to ensure only one valid entry exists by running the following query:
select * from deployed_nic_view dnic, all_nic_view anic where dnic.rnet_id = anic.rnet_id and dnic.mac_address = anic.mac_address and anic.sg_id = '<sg_id_from_step2>' and dnic.mac_address = '<mac_address_from_step3>';