1、以管理員身份啓動vm。
2、在虛擬機裏config -a查看網卡;通常由於修改配置導致網卡名字被修改。
這種情況,通常網卡配置中已經沒有eth0的配置了。
可以手動添加:
cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
#iface eth0 inet static
#address 192.168.0.129
#network 192.168.0.0
#netmask 255.255.255.0
#broadcast 192.168.0.255
#gateway 192.168.0.1
allow-hotplug eth0
3、如果是網卡名字被修改成了其他名字,可以通過dmesg查看是否被修改。
修改成eth0:
重啓虛擬機。
#service networking restart
重啓網絡
#config -a
查看網卡名字是否恢復到eth0,是否up
4、打開服務,啓動Device install service, Device setup manager,並設置爲自動啓動。
5、在網絡編輯器裏還原默認配置。重啓虛擬機即可