虛擬機(jī)拷貝移動之后, ifup eth0出現(xiàn)如下錯誤:
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.
原因
新克隆的虛擬機(jī)鏡像的網(wǎng)卡mac地址已經(jīng)變更。打開虛擬機(jī)的.vmx文件,ethernet0.generatedAddress項記錄了該虛擬機(jī)的mac地址。
解決辦法:
rm /etc/udev/rules.d/70-persistent-net.rules
通過 vi /etc/network/interfaces 修改ip地址
然后 /etc/init.d/networking restart