Linux 解决Device eth0 does not seem to be present

虚拟机克隆后出现网卡启动失败现象

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]
Bringing up interface eth1:  Device eth0 does not seem to be present,delaying initialization.                    [FAILED]

解决方法:
只需保证虚拟机的MAC地址与70-persistent-net.rules内的MAC地址一一对应即可
Linux 解决Device eth0 does not seem to be present_第1张图片

修改70-persistent-net.rules

--修改后需reboot
[root@mysqlm1 ~]# vi /etc/udev/rules.d/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:f7:0d:75", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:76:d2:cd", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

修改ifconfig-eth0/ifconfig-eth1

[root@mysqlm1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
IPADDR=10.0.0.220
NETMASK=255.255.255.0
GATEWAY=10.0.0.1

--其他参数可以UUID、HWADDR可以不配置
重启虚拟机后,重启网卡
# service network restart
恢复正常了

你可能感兴趣的:(Linux)