UbuntuServer 16.04 VirtualBox机器 - 网络接口的紧急模式

UbuntuServer 16.04 VirtualBox机器 - 网络接口的紧急模式

问题描述:

我在Ubuntu16.04Server O.S.上使用虚拟机。在Windows主机上。 一切都很完美,但关掉所有东西然后回到我的虚拟服务器后,机器无法启动。UbuntuServer 16.04 VirtualBox机器 - 网络接口的紧急模式

它显示:

[FAILED]无法开始抬起网络接口。有关详细信息,请参阅'systemctl status networking.service'。

所以系统进入紧急模式! 通过键入journalctl -xb,我可以看到以下问题:

... 
ifup[1987]: Cannot find device "ens33" 
... 
ifup[1987]: Failed to bring up ens33. 
systemd[1]: netowrking.service: Main process exited, code=exited .... 

所以我觉得我的未能启动加薪网络接口

Subject: Unit networking.service has failed 
Defined-By: systemd 

通过键入ifconfig我只看到lo接口。显示了ens33

在我/etc/network/interfaces我也有2行:

auto ens33 
iface ens33 inet dhcp 

通过键入lshw我已经涉及到网络的输出如下:

*-network DISABLED 
    description: Ethernet interfaces 
    product: 82540EM Gigabit Ethernet Controller 
    vendor: Intel Corporation 
    physical id: 3 
    bus info: [email protected]:00:03.0 
    logical name: enp0s3 
    ... 
    ... 
    configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.21-k8-NAPI duplex=full....... 

所以,如果我跑ifup ens33我有错误

Cannot find device ens33 
Error getting hardware address for "ens33": No such device 

该虚拟机具有默认以太网卡Intel PRO/1000 MT Desktop(82540EM)连接为NAT。

它完全卡住,我不能前进,只有紧急模式

终于找到了解决办法: 的应该问题似乎涉及到以太网卡不匹配,我的解决办法是:

进入紧急模式 虚拟机 编辑/etc/network/interfaces文件上换卡通过改变ens33接口参数和添加新的eth0接口:通过重新启动网络服务

auto ens33 
iface ens33 inet manual 

auto eth0 
iface eth' inet dhcp 

在这一点上,我可以看到界面了。

后,有必要对/etc/default/grub文件的编辑,改变了线路从

GRUB_CMDLINE_LINUX="" 

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" 

然后,我跑到下面的命令:

sudo update-grub 
sudo reboot