虚拟机拷贝移动之后, ifup eth0出现如下错误:
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地址已经变更。打开虚拟机的.vmx文件,ethernet0.generatedAddress项记录了该虚拟机的mac地址。
解决办法:
rm /etc/udev/rules.d/70-persistent-net.rules
通过 vi /etc/network/interfaces 修改ip地址
然后 /etc/init.d/networking restart