[Q&A]虚拟机中CentOS网卡启动故障

前端之家收集整理的这篇文章主要介绍了[Q&A]虚拟机中CentOS网卡启动故障前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

故障描述:
# 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]
解决方法
1.修改Centos虚拟机克隆机的HWADDR为ifconfig -a的MAC地址

(或者将/etc/sysconfig/network-scripts/ifcfg-eth0 文件中的HWADDR 行用‘#’注释掉)
形如:HWADDR="00:0C:29:90:A7:23"
2.删除文件后重启
# rm -rf /etc/udev/rules.d/70-persistent-net.rules
# reboot


/etc/udev/rules.d/70-persistent-net.rules 文件内容如下:

$ cat /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:d2:a6:db",ATTR{type}=="1",KERNEL=="eth*",NAME="eth0"

原文链接:https://www.f2er.com/centos/380847.html

猜你在找的CentOS相关文章