Sometimes you have an environment, which shows up with duplicate MAC addresses. You can see the alarms within in your vCenter server web client, and even worse, you won't be able to power On a virtual machine (VM) which is in MAC address conflict with another VM. In this post, we will look at possible reasons and solutions What to do when you have Duplicate MAC address within VMware vSphere Environment.
Reasons, why there are multiple MAC addresses on the same network, are quite numerous. It can be two vCenter server instances with identical IDs overlapping MAC addresses for VMs network adapters.
Or it can be simple, let's say a replication software which replicates VMs to another site managed by a single vCenter server. We'll have a look at both.
Basically, to have identical MAC address on two different VMs is problematic because:
Quote:
A virtual machine powers on and functions properly, but shares a MAC address with another virtual machine. This situation might cause packet loss and other problems.
Yes, there can be a packet loss or performance degradation of the network.
How to find vCenter Server ID?
Simple. Connect to your vCenter server via vSphere Web client and go to
In vSphere Client, click Administration > vCenter Server Settings > Runtime Settings > Type a new unique ID and click OK.
Each vCenter Server system has a vCenter Server instance ID. This ID is a number between 0 and 63 that is randomly generated at installation time but can be reconfigured after installation. This is where you need to change it. Depending on the ID number, vCenter server generates MAC address from a pool, so if you have two vCenter server instances with the same ID, make sure to change the ID number after installation.
You might be in a situation, where you have a VM copied from another vSphere installation and where the vCenter server had the same ID as the ID of your vCenter server. Not likely, but can happen. In this case, it's fairly simple to edit the MAC address of the VM while the VM is powered OFF.
Edit the VM's virtual hardware. Select and expand Network Adapter > Change the MAC address assignment to Manual > Change the MAC address.
You might also re-create the adapter of that powered Off VM, by deleting the old and adding a new one. In this case, however, you might lose the networking settings so the solution would be to:
- Power On the VM without connecting the virtual network
- Within the Guest OS, verify the network settings and save for later (netsh -c interface dump > PATH_AND_FILENAME.txt)
- Delete the vNIC
- Add new vNIC and connect to the network
- Power On the VM and within the guest OS import the config (netsh -f PATH_AND_FILENAME.txt)
If you have vSphere Replication (VR) in place or you are using another replication software for DR purposes, you might be in a situation where you have MAC address conflicts within your vCenter server. In this case, those VMs won't go online while you're up and running on the main site. I mean, within a normal situation, when everything is OK the replicas will stay Offline.
You can safely turn off the vCenter server alarm:
- Log in to vCenter Server using the vSphere Client, go to the Hosts and Clusters view > vCenter Server instance.
- Select the Management tab > Alarm Definitions.
- Search for VM MAC in the search window.
- Edit the VM MAC Conflict alarm.
- Deselect Enable this alarm.
You can also have a situation when your backup software restores a VM to a new location, with the same MAC address (if that VM had static MAC configured). By default, VMware vSphere has dynamic MAC enabled when creating new VMs and it only makes sense.
Well, this is about it. I'm sure that most VMware admins know their ways, but new people learning VMware virtualization technology might find it useful.
More from ESX Virtualization
- VMware Mirage Architecture Preparation Steps
- VMware vSphere Client Download Page
- ESXi Free vs Paid – What are the differences?
- Top 3 VM Replication Software for VMware vSphere Environments
- V2V Migration with VMware – 5 Top Tips
Stay tuned through RSS, and social media channels (Twitter, FB, YouTube)
Joshua says
Also, Veeam SureBackup often triggers this alarm as the VM has a duplicate MAC but is on the isolated network for testing and not able to talk to production networks.
Kevin says
I am not sure you are completely spot on with this post. MAC addresses are set on the host, not in the vCenter. Case in point, you do not need vCenter to have vm’s deployed on an ESX host. Additionally, the most common cause for duplicate MAC addresses I have come across is due to IT Admins cloning their ESXi deployment. The MAC address pool is created on each ESXi host during installation of the OS. The pool is seeded by the MAC address on the physical network port, and then as MAC addresses are needed they are put through an algorithm. As part of the hypervisor installation, the MAC address used to generate the initial pool is burned into the install. If you then take the that original installation and clone it for other ESXi hosts, the clone has the seed MAC from the original server on all the clone hosts, and therefore the MAC address pools on multiple ESX hosts are exact duplicates. I have not seen vCenter fixing this issue either, nor have I seen a way to fix the seed MAC address without re-installing the OS on each host and not using a clone.