We have an automated VM environment where VMs are created & deleted frequently each day. Most of these VM are using IPv4 DHCP. The mac-address reuse makes it challenging for our automation to find the mac/IP mapping at the external dhcp server. The previous IP hasn’t timed out yet for the deleted VM. (we have a 15 min lifetime).
The virtual network MAC pool on OpenNebula v6.10 re-uses the just released MAC for the very next VM’s vNIC. While this is all technically correct from a networking perspective, it does present some challenges. (external network switches relearning mac quickly is one concern too.)
Anyhow I was wondering if there was an way to configure an “age” timer or some way to delay reuse of the mac until X minutes after release?
I found this older post from 2016 asking similar question:
Since that was back in 2016, I thought of checking if that is still solution or is there any new configurable on OpenNebula vnet pool side? (I couldn’t find one.)
Thanks for confirming the current solutions.
As for expanding the MAC range, that will not help. The size of the pools isn’t the issue, its related to it reusing the same mac immediately after its released/free.
We’ll explore how best to avoid this, but wanted to be sure there wasn’t a newer option available that I was missing.
Once again thank you for your time and this wonderful Open Nebula product.
In general, when a VM is terminated (the DONE state), a hook could be triggered to tag the VM MACs in the VNet AR as reserved. This way, the MAC will not be offered to other VMs… Well, you’d need to have a periodic script to release the reservations so as not to exhaust the entire AR. However, how frequently reservations are to be released depends on the use case.