【问题标题】:UbuntuServer 16.04 VirtualBox Machine - Emergency Mode for Network InterfacesUbuntu Server 16.04 VirtualBox 机器 - 网络接口的紧急模式
【发布时间】:2016-12-29 18:39:07
【问题描述】:

我正在使用带有 Ubuntu16.04Server OS 的虚拟机。在 Windows 主机上。 一切正常,但在关闭一切并返回我的虚拟服务器后,机器无法启动。

它显示:

[FAILED] 无法启动 Raise 网络接口。有关详细信息,请参阅“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 ....

所以我发现我的无法启动 Raise 网络接口

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: pci@0000: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

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

完全卡住了,我无法前进,只有紧急模式

【问题讨论】:

    标签: virtual-machine ubuntu-server ifconfig


    【解决方案1】:

    终于找到了解决办法: 该问题似乎与以太网卡不匹配有关,我的解决方案是:

    在虚拟机上换卡 进入紧急模式 编辑/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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-12-17
      • 1970-01-01
      • 2017-08-23
      • 1970-01-01
      • 2017-09-27
      • 2020-05-18
      • 2021-02-15
      • 2013-07-04
      相关资源
      最近更新 更多