zoukankan      html  css  js  c++  java
  • Device eth0 does not seem to be present,delaying initialization

    VirtualBox复制虚拟机后,发现新的虚拟机网卡启动不了。

    ifconfig -a ...没有看到eth0.。然后重启网卡又报下面错误。

    故障现象:

    service network restart
    
    Shutting down loopback insterface: [ OK ]
    
    Bringing up loopback insterface: [ OK ]
    
    Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization. [FAILED]
    

    修改配置文件:vi /etc/udev/rules.d/70-persistent-net.rules

    vi 70-persistent-net.rules
    
    # This file was automatically generated by the /lib/udev/write_net_rules
    
    # program, run by the persistent-net-generator.rules rules file.
    
    #
    
    # You can modify it, as long as you keep each rule on a single
    
    # line, and change only the value of the NAME= key.
    
    # PCI device 0x8086:0x100e (e1000)
    
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:48:20:62", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
    
    # PCI device 0x8086:0x100e (e1000)
    
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:c2:0c:25", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
    

    发现有两个网卡,etho和eth1,并且两个MAC地址也不一样,实际上并没有eth1网卡。

    处理方法:

    1、删除或生命名这个文件:70-persistent-net.rules

    2、Ifconfig –a 查看mac

    3、修改网卡配置文件中的HWADDR为ipcofnig –a 看到的MAC地址

    [root@namenode1 rules.d]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE=eth0 HWADDR=08:00:27:C2:0C:25 TYPE=Ethernet UUID=048c738b-8b3a-4deb-9478-e17c760b92bd ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static IPADDR=192.168.1.139 MASK=255.255.255.0 GATEWAY=192.168.1.1

    重启系统,reboot –h now

    重启后,查看文件70-persistent-net.rules

    [root@namenode1 rules.d]# vi 70-persistent-net.rules
    
     
    
    # This file was automatically generated by the /lib/udev/write_net_rules
    
    # program, run by the persistent-net-generator.rules rules file.
    
    #
    
    # You can modify it, as long as you keep each rule on a single
    
    # line, and change only the value of the NAME= key.
    
     
    
    # PCI device 0x8086:0x100e (e1000) (custom name provided by external tool)
    
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:c2:0c:25", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0
    

    只有一个etho,正常。

  • 相关阅读:
    ThinkPHP 3 的输出
    zookeeper 伪集群模式
    zookeeper
    MVC模式和URL访问
    全民上云时代,如何降低成本?
    华为云教你7天玩转电商应用性能调优,课程免费速来报名!
    一统江湖的大前端(6)commander.js + inquirer.js——懒,才是第一生产力
    一统江湖的大前端(5)editorconfig + eslint——你的代码里藏着你的优雅
    一统江湖的大前端(4)shell.js——穿上马甲我照样认识你
    【Python3网络爬虫开发实战】1.3.1-lxml的安装
  • 原文地址:https://www.cnblogs.com/rusking/p/5291351.html
Copyright © 2011-2022 走看看