歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> VMware 克隆CentOS 後無法啟動網卡的解決

VMware 克隆CentOS 後無法啟動網卡的解決

日期:2017/2/28 14:36:36   编辑:Linux教程

VMware 克隆CentOS 後無法啟動網卡的解決方法心得筆記。

首先要保證udev-post 啟動

[root@localhost ~]# chkconfig --list|grep udev
udev-post 0:off 1:on 2:on 3:on 4:on 5:on 6:off

[root@localhost ~]# /etc/init.d/udev-post start
Retrigger failed udev events [ OK ]
[root@localhost ~]#

將原有的eth0的那一行注釋掉,然後將生成的eth1改為eth0

[root@localhost ~]# 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:0x100f (e1000)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:8c:61:3e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:3c:e6:09", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
[root@localhost ~]#

最後修改網卡的配置文件

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=fb802c67-087a-4f50-812b-f3d20053aa4b
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
HWADDR=00:0C:29:3C:E6:09
IPADDR=192.168.100.212

PREFIX=24
GATEWAY=192.168.100.1
DNS1=192.168.100.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
[root@localhost ~]#

最後重新啟動系統

CentOS虛擬機克隆後網卡配置問題 http://www.linuxidc.com/Linux/2013-02/79804.htm

更多CentOS相關信息見CentOS 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=14

Copyright © Linux教程網 All Rights Reserved