VMware vSphere

 View Only
  • 1.  NIC not found after removing for rhel 6 vm

    Posted Feb 16, 2013 04:03 AM

    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



  • 2.  RE: NIC not found after removing for rhel 6 vm

    Posted Feb 16, 2013 06:54 AM

    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



  • 3.  RE: NIC not found after removing for rhel 6 vm

    Posted Feb 16, 2013 07:29 AM

    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



  • 4.  RE: NIC not found after removing for rhel 6 vm

    Posted Feb 16, 2013 10:30 AM


  • 5.  RE: NIC not found after removing for rhel 6 vm

    Posted Feb 16, 2013 01:59 PM

    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,



  • 6.  RE: NIC not found after removing for rhel 6 vm

    Posted Feb 16, 2013 11:52 AM

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



  • 7.  RE: NIC not found after removing for rhel 6 vm

    Posted Feb 16, 2013 02:13 PM

    +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.