January 18, 2021

MAC Mambo Jambo - Duplicate MAC detected when couple with a cloud Environment / VM MAC conflict

Recently we had an issue  -  Duplicate MAC detected when couple with a cloud Environment


 

to understand the issue we need to know How vCenter allocates MAC addresses.

EX -  MAC address -  00:50:56:XX:YY:ZZ

where 00:50:56 represents the VMware OUI

XX is calculated as (80 + vCenter Server ID in Hexadecimal), 

and YY:ZZ is a random number.

Each vCenter Server instance has an ID between 0 and 63 that is randomly generated at installation time(This can be reconfigured after installation)

reference  - https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.troubleshooting.doc/GUID-8D7D0126-8E8A-470F-A61E-4197EE32D08F.html

VMware KB - https://kb.vmware.com/s/article/1024025

in this case legacy VC

  • DTEST1VC65 - vCenter ID 63
  • DTEST2VC65 -  vCenter ID 4

cloud VC   

  • vCenter ID 4  <==  The New VC

so both DTEST2VC65  and cloud vCenter was using 00:50:56:84:YY:ZZ and YY:ZZ is a random number

this was went UN-detected for a while and suddenly they having this issue  .

in this case 

  1. we change vCenter ID (which we need to restart the services to get updated when creating new VMs) on both Legacy and New VC, so no duplication in the future 
  2. Generate a list of MAC using each vCenter  -  Powercli or RV tools 
  3. removed all duplicated ones

hope this will useful when you are using a vcenter from a cloud provider connect to your legacy / on-prem VC.