"The following IP/MAC addresses have already been used by running virtual machines: MAC addresses" error when powering on a virtual machine in VMware Cloud Director
search cancel

"The following IP/MAC addresses have already been used by running virtual machines: MAC addresses" error when powering on a virtual machine in VMware Cloud Director

book

Article ID: 325491

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • Powering down a virtual machine in Cloud Director fails with a UI error in the form:
The following IP/MAC addresses have already been used by running virtual machines: MAC addresses: xx:xx:xx:xx:xx IP addresses: Use the Fence vApp option to use same MAC/IP. Fencing allows identical virtual machines in different vApps to be powered on without conflict, by isolating the MAC and IP address of the virtual machine.


Environment

VMware Cloud Director 10.x

Cause

This is expected behavior when there is a conflict of IP/MAC address between an existing/running VM with the VM being powered on inside the Organization VDC.

Resolution

For IP conflicts, the following query provides more information on the affected VMs,networks of the VM and what they are connected to:
select network_interface.mac_address as MAC,allocated_ip_address.address as IP,vapp_vm.name as VM_Name,vm_container.name as vApp_Name,org_prov_vdc.name as VDC_Name, vapp_vm.id as VM_ID, logical_network.name as Network_Name, logical_network.scope_type as network_type, network_interface.nic_id, allocated_ip_address.id,logical_network.id as Network_id
from vapp_vm
left join network_interface on network_interface.netvm_id = vapp_vm.nvm_id
left join allocated_ip_address on allocated_ip_address.id = network_interface.address_id
left join logical_network on logical_network.id = network_interface.lnet_id
left join vm_container on vm_container.sg_id = vapp_vm.vapp_id
left join org_prov_vdc on org_prov_vdc.id = vm_container.org_vdc_id
where allocated_ip_address.address = '<conflicting IP address from the error>'
ORDER BY allocated_ip_address.address;

For MAC conflicts, the following query provides more information on the affected VMs,networks of the VM and what they are connected to:
select network_interface.mac_address as MAC,allocated_ip_address.address as IP,vapp_vm.name as VM_Name,vm_container.name as vApp_Name,org_prov_vdc.name as VDC_Name, vapp_vm.id as VM_ID, logical_network.name as Network_Name, logical_network.scope_type as network_type, network_interface.nic_id, allocated_ip_address.id,logical_network.id as Network_id
from vapp_vm
left join network_interface on network_interface.netvm_id = vapp_vm.nvm_id
left join allocated_ip_address on allocated_ip_address.id = network_interface.address_id
left join logical_network on logical_network.id = network_interface.lnet_id
left join vm_container on vm_container.sg_id = vapp_vm.vapp_id
left join org_prov_vdc on org_prov_vdc.id = vm_container.org_vdc_id
where network_interface.mac_address = '<conflicting MAC address from the error>';

In order to resolve the issue, follow one of the options below:
  1. Change the IP/MAC address of the running virtual machine.
  2. Enable Fenced mode on the vApp and continue to use the same IP/MAC
  3. Power down the virtual machine using the conflicting IP/MAC address.


Additional Information

Refer Page 83 of https://docs.vmware.com/en/VMware-Cloud-Director/10.3/VMware_Cloud_Director_Tenant_Portal_Guide.pdf?hWord=N4IghgNiBcIGYFMB2BjBATABAWwPboRAF8g for detailed information on fenced networks.