關於virulbox克隆了centos6.0最小化安裝後如何使網卡能夠上網
阿新 • • 發佈:2018-04-18
virulbox克隆系統網卡上網解決辦法:
解決:# mv /etc/sysconfig/network-scripts/ifcfg-eth0
sysconfig/network-scripts/ifcfg-eth1
vim
sysconfig/network-scripts/ifcfg-eth1
修改DEVICE="eth0"
為DEVICE="eth1"
So here’s how we fix it:
Remove the kernel’s networking interface rules file so that it can be regenerated
# rm -f /etc/udev/rules.d/70-persistent-net.rules
Restart the VM
# reboot
UPDATE your interface configuration file
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Remove the MACADDR entry or update it to the new MACADDR for the interface (listed in this file: /etc/udev/rules.d/70-persistent-net.rules).
Remove the UUID entry
Save and exit the file
Restart the networking service
# service network restart
Happy cloning!
二.另一種方法
造成這樣的原因,是因為在虛擬機(Vmware)中移動了Centos系統對應的文件,導致重新配置時,網卡的MAC地址變了,輸入ifconfig -a,找不到eth0
·······
安裝完一個centos虛擬機,又拷貝一份,開機後網卡無法正常啟動,報錯:Device eth0 does not seem to be present,
delaying initialization
解決:# mv /etc/sysconfig/network-scripts/ifcfg-eth0
sysconfig/network-scripts/ifcfg-eth1
vim
sysconfig/network-scripts/ifcfg-eth1
修改DEVICE="eth0"
為DEVICE="eth1"
修改IP地址,刪除mac地址(HWADDR),刪除UUID項。
然後重啟啟動網卡嘗試下
關於virulbox克隆了centos6.0最小化安裝後如何使網卡能夠上網