VMware 克隆CentOS 后无法启动网卡的解决
2015-06-15 10:58
549 查看
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 ~]#
最后修改网卡的配置文件,将HWADDR的值修改为/etc/udev/rules.d/70-persistent-net.rules文件中的新值
[root@localhost ~]# vim /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:62: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 ~]#
最后重新启动系统
reboot
首先要保证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 ~]#
最后修改网卡的配置文件,将HWADDR的值修改为/etc/udev/rules.d/70-persistent-net.rules文件中的新值
[root@localhost ~]# vim /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:62: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 ~]#
最后重新启动系统
reboot
相关文章推荐
- linux 命令——9 touch (转)
- do {...} while (0) 在宏定义中的作用
- linux 命令——8 cp (转)
- Linux入门篇之一:一起学习Linux吧!
- linux 命令——7 mv(转)
- Linux netstat命令详解
- Centos6.6升级python版本
- Linux下编译VLC for Android源代码总结
- 查看ubuntu系统是32位还是64位,查看系统版本
- linux tar 解压命令总结
- Linux top命令详解
- 鸟哥的linux私房菜-基础学习篇(第二版)
- 每天进步一点点——linux——mkdir
- [感受]20100124linux使用回顾
- 20091105今天开始只用linux了
- Linux内存开辟
- linux svn服务器搭建、客户端操作、备份与恢复
- linux svn服务器搭建、客户端操作、备份与恢复
- VNC配置连接远程服务器桌面-linux\windows
- linux 命令——6 rmdir(转)