Fix eth0 network interface when cloning RedHat VM using VirtualBox or VMWare

Cloning a VM is very useful in case of development study as well as  for production environment like working with VM ware esx server. This reduce your time and effort both. But in case of cloning existing system SSID did'nt get changed automatically and it cause network related issues.  

When we clone an existing RHEL/CentOS/Scientific Linux VM  using either Oracle virtual box or Vmware workstation we find eth0 not working and instead of that there is eth1. In the same scenario if you have two NIC  for that VM  then eth0 and eth1 will not work but instead there will be eth2 eth3.

So here i am telling you the solution  :
Assume i have eh0 configured and i am just going to clone the VM

login into the new cloned vm

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

there you will find new MAC ids for new interface  eth1 

(" for eth0 it will show Device eth0 does not seem to be present, delaying initialisation " )

 Now delete the lines having eth0 information  and change the name for eth1  as eth0. Note the MAC ID. Now open your ifcfg-eth0 file

# vim /etc/sysconfig/networking/devices/ifcfg-eth0

Delete the UUID line completely  and change the MAC with new one.

change the hostname of vm form 

# vim /etc/sysconfig/network

reboot the vm 

# reboot

here we have done!

Comments

Popular posts from this blog

Running web ssh client on port 443 /80 with nginx as reverse proxy

Running cockpit behind nginx reverse proxy with nginx ssl and cockpit non ssl

Setup VOD streaming server with nginx using RTMP on Ubuntu 18.04