解决VM虚拟机里Ubuntu克隆后网卡不能使用的问题
2009年10月28日 星期三 14:22
2009-09-16 09:55
当我在VM虚拟机里安装好Ubuntu 9.04 server后,克隆了一份到别的虚拟机里用,结果不能正常使用,网络不通,测试如下: sudo /etc/init.d/networking restart * 重新配置网络接口... eth0: ERROR while getting interface flags: No such device SIOCSIFADDR: No such device eth0: ERROR while getting interface flags: No such device SIOCSIFNETMASK: No such device SIOCSIFBRDADDR: No such device eth0: ERROR while getting interface flags: No such device eth0: ERROR while getting interface flags: No such device Failed to bring up eth0.
说明网卡不能使用,上网查找,原来是以太网MAC地址缓存的的问题,保存的还是 原来机器MAC地址。现在需要删除一个文件,以清除缓存值,命令如下:
sudo rm /etc/udev/rules.d/70-persistent-net.rules
之后重新启动您的服务器的网络就可以了。 我也编辑修改了下列文件更改静态IP地址和主机名: /etc/hosts - 更改IP地址和主机名 /etc/hostname /etc/network/interfaces
|
|