之前采用vmware的时候,克隆了几个虚拟机,可以启动, 就是没有网卡,不能上网。
当时在网上查找了一个解决办法给搞定了。
现在采用parallels的时候,pvm从一台mac 迁移到另一台上,还是能开机,不能联网。
又上网找了一下, 解决方法和之前是一样的。
解决办法:
主要是修改 /etc/udev/rules.d/70-persistent-net.rules即可
一般,系统会自动在70-persistent-net.rules添加新的虚拟网卡,但是和interfaces(ubuntu)或者 ifcfg-eth0(centos)对不上。
所以修改这两处的任一一处即可。
比如修改 70-persistent-net.rules
$cp /etc/udev/rules.d/70-persistent-net.rules
/etc/udev/rules.d/70-persistent-net.rules.backup
编辑文件:
把原先的eth0注释,把下面的eth1改为eth0,(其他网卡同理)。
# 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.
# PCI device 0x10ec:0x8029 (ne2k-pci)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:42:cc:ee:c0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x10ec:0x8029 (prl_eth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:42:d2:8e:8e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
英文连接:
http://kb.parallels.com/cn/8102
在使用VMware或Parallels进行虚拟机克隆或迁移后,经常遇到无法联网的问题,原因是虚拟网卡配置不一致。解决方法是修改/etc/udev/rules.d/70-persistent-net.rules文件,将文件中的网卡名称与接口配置文件匹配,例如将eth1改为eth0。执行此操作后,虚拟机将能够正常联网。
1981

被折叠的 条评论
为什么被折叠?



