在virtualbox克隆出來的centos啓動後ifconfig沒有看到eth0.接着重啓網卡報錯:
service network restart
Shutting down loopback insterface: [ OK ]
Bringing up loopback insterface: [ OK ]
Bringing up interface eth0: Device eth0 does not seem to be present,delaying initialization. [FAILED]
因爲複製之前配置了兩個網卡,啓動了兩個centos分別把/etc/udev/rules.d/70-persistent-net.rules對比發現,複製後的centos裏的增加了2個網卡,分別是網卡eth2,eth3.然後上網查了下資料發現是因爲複製之後mac地址重新分配,所以把eth2,eth3的mac地址複製到eth0,eth1,然後eth3,eth4.
重啓後發現ifconfig還是沒有網卡,service network restart還是失敗。這時用setup命令,對eth0,eth1進行設置。然後重啓網卡服務,那麼ok了。