Mac Address duplication

Here is the scenario that has happened to us.

Our open nebula server connects to our vcenter instance to deploy vm’s. We have imported the virtual networks from vcenter into open nebula and have deployed a few hundred vm’s across 2 virtual networks with no problems.

we had a hardware failure on one of our vmware hosts a few weeks ago and so we had to restore the open nebula system from a backup, about 6-8 hours back. This caused some of the vm’s deployed by open nebula to remain on the vmware host without open nebula being aware of their presence. This was OK as we just removed these non crtical systems since that was acceptable in our particular environment and moved on.

Now a week or so later we are seeing a strange symptom that I am not sure if it’s related. Our vm’s are sometimes deploying with duplicate mac addresses even after the old ones are gone. I cannot seem to find any of the obvious commonalities to figure out why the mac address is being duplicated.

I would prefer to have vmware do the “auto” mac address feature instead, so that mac address conflicts cannot exist. is there a way to do this rather then the open nebula static assignment of mac addresses? if not, does anyone have any help to offer with this one?

Just wondering if anyone actually looked at this. it’s not crippling us but it’s definetely a recurring problem.

Hi Ryan.
does vCenter alert you from duplicated MAC addresses? maybe there’s an error in the Event Console that give us a clue about why the mac address is in conflict and what VM/Template is involved. I found this link useful.

Maybe you have vCenter templates with NICs that have OpenNebula mac addresses which collide with the VM being deployed. vCenter templates are just vCenter VMs with a flag so although templates are not running VMs of course, its mac addresses can be seen by vCenter as in use by the templates.


I’ve seen this on 5.3.85 and vcenter 6.5, it happened after importing all the elements (not even provisioning anything new), assumed it was a coincidence, just modified the machine (set manual, save, set auto, save) and moved on…

I still didn’t use heavily this setup.

I have had to manually scrub out the old machines. I was not able to find a
better solution to this. I am still finding them as we have hundreds and
there is no easy way to do this.
I will try using powerCLI to get it done somehow.

Sure, you can use something like:

The issue is, if there’s a bug in Opennebula that triggers this…

Hi Ciro,
maybe it’s a bug. Could you explain what steps did you follow in order to reproduce that issue? What did you import, and when did you notice the MAC address duplication issue?

Do you have VMs deployed from another OpenNebula installation in the same vcenter instance where you’re testing OpenNebula 5.3.85?

Thanks for your feedback

I’m sorry, I didn’t take notes of that test. I did import anything I could (datastore, VMs, networks, etc). I noticed the warning after importing all of that. I didn’t create any new VM before seeing that (that’s why I though it shouldn’t be related to the Opennebula interaction).

Trying to change the resource limits (oversubscription) I messed up the lab, so I purge the database and started over. Saw again the duplicated MAC message on vcenter and proceeded with the same workaround (being it a home lab, there’re no many VMs).

I find it interesting that other people reported the same/similar behaviour. I’ll keep looking while provisioning and report back if anything strange happens.

Thanks for your feedback.

OpenNebula calculates the MAC addresses based on the IP assigned to a particular NIC, with a common prefix defined in /etc/one/oned.conf. By default it is set to “02:00” which is a local administrated MAC address prefix.

Do the MAC addresses reported as duplicated feature this prefix? Maybe changing the prefix in case of DR scenario can alleviate this issue.