Resolving MAC Address Conflicts in VMware ESXi

Evey once in a while it happens again. You run virtual machines on an ESX server and something seems to be wrong with the network communication. you search and search and find that mac addresses are assigned multiple times.

Resolving MAC Address Conflicts in VMware ESXi

When cloning virtual machines the VMX file stores information about the virtual MAC address of the virtual NIC installed within VM. I recently ran into an issue where machines had been cloned on a VMware ESXi installation and new UUID’s had not been generated. This caused duplicate MAC addresses to be used on two different VMware servers which caused some connectivity issues between them because of some general confusion in ARP resolution.

From VMware’s documentation.

“The UUID is a 128-bit integer. The 16 bytes of this value are separated by spaces, except for a dash between the eighth and ninth hexadecimal pairs. So a sample UUID looks like this: 00 11 22 33 44 55 66 77-88 99 aa bb cc dd ee ff The UUID is based on the physical computer’s identifier and the path to the virtual machine’s configuration file.”

To generate a new UUID do the following within VMware ESXi. Remove the VM from your inventory. SSH into the hypervisor and go to /vmfs/volumes/datastore# Rename the directory that your VM lives in with mv vmdir newvmdir. Go into your VM directory and edit the VMX files and remove these the lines that start with this.

uuid.location=
uuid.bios=
ethernet0.GeneratedAddress=
uuid Action

Add the VM to inventory and do your initial power up. The new UUID will generate a new and unique MAC address and all the layers of your network will be happy once again. This will work with VMware ESX and Server / GSX as well.