[xen-tools-discuss] xen-create-image (Debian Jessie, xen-tools 4.5-1) and duplicate MAC addresses
Pietro Stäheli
pietro.staeheli at revamp-it.ch
Fri Feb 17 15:42:48 CET 2017
Hi folks,
I found out yesterday that xen-create-image generates MAC addresses
derived from command-line arguments (specifically hostname, IP/DCHP,
distribution, see sub generateMACAddress in xen-create-image). This will
lead to two domU's created with the same hostname and distribution, both
configured with DHCP or the same IP address to have the same MAC
address. This predictably leads to unpredictable things happening when
those two domU's are started on the same network. Switches start
catching on fire, reality folds in on itself, etcetera.
I would like to ask if this is intended behavior and the reasoning
behind doing it this way, before filing a bug report.
Naturally, only a monumentally stupid person would actually have two
hosts with the same hostname on the same network, which is probably why
this happened to me. But still, would it not be sensible to add some
amount of randomness to the generation of the MAC address? Just
randomizing one octet of the MAC would make running into this problem
far less likely. Randomizing the addresses entirely would also make them
reasonably unique.
Browsing through the source of xen-tools 4.7 seems to indicate that this
function hasn't changed in the new version either.
Regards,
Pietro Stäheli
More information about the xen-tools-discuss
mailing list