VMware Cloud Community
shyfur
Contributor
Contributor

NIC not found after removing for rhel 6 vm

Dear All,

Yesterday, I faced an issure. That is, I created a VM on ESXi 5.1 and the OS is RHEL 6.2. OS was working fine. Suddenly I have removed NIC from that OS. and added new one. But I am not getting the NIC from OS. Hope someone faced this issue. Need your suggestion.

Regards,

Shyfur

Tags (1)
0 Kudos
6 Replies
aravinds3107
Virtuoso
Virtuoso

Welcome to the Communities..

Have you tried restarting the VM?

Make sure both Connected and Connect at PowerON Checkbox are checked ib VM Network properties

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful |Blog: http://aravindsivaraman.com/ | Twitter : ss_aravind
0 Kudos
shyfur
Contributor
Contributor

Dear aravind,

Thank you for your reply.

Yes, I restered the VM several time. after that I checked with "ifconfig" command, not showing "eth0", After that I restarted the network service. It turn into an error "Network Card is not present".

Regards,

Shyfur

0 Kudos
a_nut_in
Expert
Expert

See whether this helps.

Or install Kudzu

http://superuser.com/questions/332593/how-do-you-automatically-detect-a-new-network-card-in-centos-6...

Do remember to mark my post as "helpful" or "correct" if I've helped resolve or answer your query!
0 Kudos
nielse
Expert
Expert

Check /etc/udev/rules.d/ and remove anything eth0 and eth1 related into your files, then reboot the server.

@nielsengelen - http://foonet.be - VCP4/5
0 Kudos
Gortee
Hot Shot
Hot Shot

Morning,

This is a common issue.  eth0 is hard coded in /etc/sysconfig/network-scripts to a specific MAC address.   Make sure your using ifconfig -a not just ifconfig... in this situation ifconfig will not display the new adapter because it does not have a specific config for it. 

Do the following:

1.ifconfig -a

2. Get the mac address for eth1/eth_whatever it is

3. cd /etc/sysconfig/network-scripts

4. vi ifcfg-eth1

5. Make sure the max is correct and do your network settings are correct

6. Restart networking /etc/init.d/network restart

7. Your good to go.  

If you want the new adapter to be eth0 then you have to remove the udev rules and reboot as suggested.

Please let me know if you have questions.

Thanks,

Joseph Griffiths http://blog.jgriffiths.org @Gortees VCDX-DCV #143
0 Kudos
griffinboy
Enthusiast
Enthusiast

+1 nielse and +1 gortee

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

comment out all previous versions of eth0 (keep the one with the new MAC - you can check the MAC in vSphere VM settings)

Then you have the choice of editing the /etc/sysconfig/network-scripts/ifcfg-eth0 file directly if you know what you're doing (make sure ONBOOT=YES )

At minimum it should look like this:

DEVICE=eth0 
BOOTPROTO=none 
ONBOOT=yes 
NETWORK=10.0.1.0 
NETMASK=255.255.255.0 
IPADDR=10.0.1.27 
USERCTL=no

or by running 'system-config-network' and use the GUI

Make sure the NIC is set to connect at startup in VM settings...

Once configured, reboot the VM


There you should have your new NIC shown in ifconfig.

VCPID: 40118 (VCP310, VCP4)
0 Kudos