When preparing a CentOS box, you have to be careful about /etc/udev/rules.d/70-persistent-net-generator.rules
and /etc/sysconfig/network-scripts/ifcfg-eth0
, because it uses the MAC address of the interface to configure itself.
The way I found to overcome this, is by editing both files and removing some config lines.
Below are the modifications:
##/etc/udev/rules.d/70-persistent-net-generator.rules
Remove the line where NAME="eth0"
and insert the line below:
KERNEL=="eth0", NAME="eth0"
##/etc/sysconfig/network-scripts/ifcfg-eth0
Remove the lines where the parameters HWADDR
and UIID
appears.
Pack the box and game on.
Works like a charm, thanks for this :)