Ubuntu Cloning – Mac Address Change Mayhem.

Apparently networking in Ubuntu goes funny when you change it’s Mac Address, and picks up the changed MAC as a new NIC, and assigns it the next number sequentially. While you can get around this by statically setting the MAC address, you generally want to avoid that. Having duplicate MAC addresses is a “Bad Idea”

Instead, what you want to do, either prior to cloning, or after the fact (prior if you’re making more than one copy), is to edit the “/etc/udev/rules.d/70-persistent-net.rules” file, and remove the eth0 entry. Lets take a look:

# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:02:51:cf", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

An ugly beast of a file but that last line is the one that needs deleting. Another method of doing this, is to edit the ‘persistent-net-generator.rules’ file to include something similar to:

# ignore VMware virtual interfaces
ATTR{address}=="00:0c:29:*", GOTO="persistent_net_generator_end"

This ought to take care of it on an ongoing basis, and eliminates the need for the first line.

This came up in the VMware Communities this weekend.

16 thoughts on “Ubuntu Cloning – Mac Address Change Mayhem.

Comments are closed.