How to fix eth0 network interface on centos, redhat clone VM
How to fix eth0 network interface on centos, redhat clone VM
I recentely finished my master degree and I’ve used some virtualization of centos and had to clone two of the virtual machines (VM). The issue I encountered was that the eth0 network interface was not present, I found it quite strange at first, then thought that I was asked if I wish to change the network interface mac address when I cloned the VM. This caused the network interface to not start on boot.
1 2 |
ifup eth0 Device eth0 does not seem to be present, delaying initialization |
That’s the error you would receive in this case. The fix was quite easy, just have to remove the mac address from the ifcfg-eth0 file and also a 70-persistent-net.rules from the location /etc/udev/rules.d/ and then reboot the VM.
So the steps would be:
1. Remove the 70-persistent-net.rules file:
1 |
rm -f /etc/udev/rules.d/70-persistent-net.rules |
2. Edit the file ifcfg-eth0 and remove the UID and MACADDR:
1 |
vim /etc/sysconfig/networking/devices/ifcfg-eth0 |
Then just reboot the server, and on the next boot, we should have network connection!