Skip to content

Changing Linux Interface Numbering

The following method is useful when you have cloned a Linux VM and end up with a interface other than eth0. This usually happen when you are cloning or creating a VM from template with interface name eth0 and the cloned copy will have eth1 and not eth0 as the interface name. According to VMware, this is by design and can only be fixed by the following method.

Start up the VM and open up the following file with your favourite text editor and find the interface you want to remove.

/etc/udev/rules.d/70-persistent-net.rules

Make a note of the MAC Address and replace that with the one for eth0.

The MAC Address under eth0 will represent the cloned VM‘s MAC and leaving it will cause duplicate MAC issue.

Once that is done, modify the network configuration files to reflect the new eth0 interface.

/etc/sysconfig/network-scripts/ifcfg-eth0

Restart the VM and generate a new UUID and apply to the eth0 interface.

uuidgen eth0 >> /etc/sysconfig/network-scripts/ifcfg-eth0

Once the new UUID is generated, edit the file and replace the old UUID with the newly generated once which will be appended to the file.

Restart the network service or reboot the OS.

comments powered by Disqus