UbuntuServer 16.04 VirtualBox Machine - Emergency Mode for Network Interfaces

1.8k views Asked by At

I'm using a virtual machine with Ubuntu16.04Server O.S. on a Windows host. Everything was working perfectly but after switching off everything and then coming back to my virtual server, the machine doesn't start.

It shows:

[FAILED] Failed to start Raise network interfaces. See 'systemctl status networking.service' for details.

So the system goes in Emergency mode! By typing journalctl -xb, I can see the following issue:

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

So I find my failed to start Raise network interfaces

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

By typing ifconfig I see only the lo interface. No ens33 is shown.

In my /etc/network/interfaces I have also the 2 rows:

auto ens33
iface ens33 inet dhcp

By typing lshw I have the following output related to the network:

*-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.......

So if I run ifup ens33 I have the error

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

The virtual machine has the default ethernet card Intel PRO/1000 MT Desktop (82540EM) connected as NAT.

It is completly stuck and I can't go forward, only emergency mode.

1

There are 1 answers

0
pittuzzo On BEST ANSWER

Finally found a solution: The issue should seems to be related to a mismatch of the ethernet card, and my solution was:

changing card on the virtual machine entering in emergency mode Editing the /etc/network/interfaces file, by changing the ens33 interface parameters and adding the new eth0 interface:

auto ens33
iface ens33 inet manual

auto eth0
iface eth' inet dhcp

At this point by restarting the network service I could see the interface up.

After it was necessary the editing of the /etc/default/grub file, changing the line from

GRUB_CMDLINE_LINUX=""

to

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

Then I ran following commands:

sudo update-grub
sudo reboot