Virtual machine MAC address conflicts or have a duplicate MAC Address when creating a virtual machine
search cancel

Virtual machine MAC address conflicts or have a duplicate MAC Address when creating a virtual machine

book

Article ID: 313916

calendar_today

Updated On:

Products

VMware

Issue/Introduction

  • 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.
     
  • vCenter Server uses the instance ID to generate MAC addresses and UUIDs for virtual machines. If two vCenter Server systems have the same vCenter Server instance ID, they might generate identical MAC addresses (duplicate MAC address) for virtual machines. This can cause conflicts if the virtual machines are on the same network, leading to packet loss and other problems.
  • When creating a new virtual machine, the MAC address is duplicated.
     
  • Virtual machines power on and function properly, but share a MAC address with another virtual machine.
     
  • This issue can occur if the amount of new virtual machines being deployed has exceeded the default pool of MAC addresses. This causes vCenter Server to start reusing already assigned MAC addresses.


Resolution

If you deploy virtual machines from multiple vCenter Server systems to the same network, you must ensure that these vCenter Server systems have unique instance IDs. When you change the vCenter Server Unique ID, the autogenerated MAC addresses are different.
 
Note: A vCenter Server unique ID has 4 parts such as (This is not a MAC address):

00:50:56:xx
 
The first three parts never change. This is the VMware Organizational Unique Identifier (OUI). When you change the vCenter Server unique ID with the steps in this article, only the fourth part changes.
 
Note: Changing the vCenter Server ID does not result in address changing for existing virtual machines. Virtual machines created or new network adapters added after the change gets the updated address.

To view or change the vCenter Server instance ID using the vSphere Client:
  1. Log in to vCenter Server using the vSphere Client, and click Administration > vCenter Server Settings.
  2. Click Runtime Settings.

    The vCenter Server Unique ID text box displays the current vCenter Server instance ID.

     
  3. If this ID is not unique, enter a new value between 1 and 63 in the vCenter Server Unique ID text box and click OK.
  4. If you changed the vCenter Server instance ID, you must restart vCenter Server for the change to take effect.
To view or change the vCenter Server instance ID using the vSphere Web Client:
  1. Log in to vCenter Server using the vSphere Client, go to the Hosts and Clusters view and click the vCenter Server instance you want to examine.
  2. Click the Manage tab.
  3. Under Settings, click General.
  4. In the Edit vCenter Server Settings dialog box, expand Runtime Settings.

    Note: From vSphere 6.5, you need to click on Monitor -> Settings -> General  to edit vCenter Server settings. You can view or edit the vCenter Server unique ID, the vCenter Server managed address and the vCenter Server name.

     
  5. If the ID is not unique, click Edit and enter a unique value.

    Note: This value can be any number between 0 and 63, this uniquely identifies each vCenter Server system running in a common environment. By default, an ID value is generated at random.

     
  6. If you changed the vCenter Server instance ID, you must restart vCenter Server for the change to take effect.
If you have existing virtual machines with conflicting MAC addresses, edit the MAC addresses to make them unique.

You can make the MAC addresses unique by using a maintenance window, shutting down the virtual machine experiencing the issue.
 
To make the MAC addresses unique:
  1. Ensure that the virtual machine is powered off.
  2. In the vSphere Client inventory, right-click the virtual machine and click Edit Settings.
  3. Click the Hardware tab and select the virtual network adapter for the virtual machine.
  4. Under MAC Address, click Manual and enter a unique MAC address.
  5. Click OK.
  6. Restart the VMware VirtualCenter Server service. For more information, see Stopping, starting, or restarting vCenter services (1003895).
Alternatively, you can force vCenter Server to generate a new MAC address for the virtual network adapter by configuring the virtual network adapter to use a Manual MAC address, and then reconfiguring it to Automatic.
 
If the virtual machine is in production and you cannot shut down the virtual machine for making the configuration changes:
  1. Verify and record the static IP address from virtual machine for the vNIC experiencing the issue.
  2. Remove that virtual network adapter containing the duplicate MAC address from the virtual machine.
  3. Add a new virtual network adapter for the virtual machine.
  4. Apply the recorded static IP address to the newly installed virtual network adapter.
  5. Check the network settings within the guest operating system and verify the connectivity.

To verify if each host in the environment has a unique ID, run this command on each host:
 
esxcfg-info | grep -i "system uuid"

This VMware Universally Unique Identifier(UUID) generates MAC addresses that are checked for conflicts. MAC Addresses are created by using three parts, the VMware OUI, the SMBIOS UUID or the unique ID of the host and a hash based on the name of the entity that the MAC address is being generated for.
For more information on MAC Address Generation, see:

Additional Information

 
To locate a suspected duplicate MAC, run this query on the vCenter Server database and note all entity IDs:
 
select * from VPX_NIC where MAC_ADDRESS = '00:50:56:xx:yy:zz';
 
Run this query to find the virtual machine names:
 
select * from VPX_ENTITY where ID = xxxxx;
 
To disable the VM MAC Conflict alarm:
  1. Log in to vCenter Server using the vSphere Client, go to the Hosts and Clusters view and click the vCenter Server instance.
  2. Select the Management tab > Alarm Definitions.
  3. Search for VM MAC in search window.
  4. Edit the VM MAC Conflict alarm.
  5. Deselect Enable this alarm.
  6. Click Finish.