在VMware里克隆出来的CentOS Linux
首先,打开镜像系统的/etc/udev/rules.d/70-persistent-net.rules内容如下面例子所示:
# 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 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:8f:89:9
7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:50:bd:1
7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
第一、删除70-persistent-net.rules文件
第二、重启镜像服务器
第三、查看新生成的/etc/udev/rules.d/70-persistent-net.rules文件中 eth0
的mac地址
第四、修改ifcfg-eth0中的mac地址。
第五、ifup eth0即可。
亲自试验过得 哦!!!!