14

Not sure what happened. Yesterday everything worked, today I booted up my VMware and it seems Ubuntu doesn't have an internet connection at all.

Tried all the different options (besides NAT that I normally use) like Bridged and Host-Only but it didn't help. Tried restarting my network via terminal etc. Under Ubuntu's internet settings it just shows that no Wi-Fi adapter is found.

Not sure what happened overnight, maybe some update that got installed? I did accidentally turn off the host computer before I could correctly shut down Ubuntu's VMware session but I doubt that did anything. Windows 7 that is also running on VMware on the other hand works perfectly.

How to proceed? Thanks!

UPDATE: Followed this https://ubuntuforums.org/showthread.php?t=1400504 and got it working :)

Aleksandr
  • 151
  • 1
  • 1
  • 5
  • 1
    Note this issue might be happened when a guest ubuntu getting resume from suspended. But I'm not sure how to fundamentally fix it from vmware. – Louis Go Jan 19 '21 at 00:50
  • Had the same problem with Ubuntu 20 and I noticed that this occurs after you switch Wi-Fi networks. The solution in this case is a simple restart of Ubuntu and the VM. – Rahav Dec 22 '21 at 19:52

1 Answers1

30

Got it working by browsing through multiple threads.

EDIT : Please check if your network is in bridged mode or not if you are using VMWare/ VirtualBox before following the steps below. Enabling bridge mode and restarting guest OS can resolve the issue.

First check if your network is disabled by using the following cmd in terminal:

sudo lshw -C network

If it shows disabled after the name of your adapter ( note down the logical name for later use)

  *-network DISABLED        
       description: Ethernet interface
       product: 82545EM Gigabit Ethernet Controller (Copper)
       vendor: Intel Corporation
       physical id: 1
       bus info: pci@0000:02:01.0
       logical name: ens33

All we need to do is enable the adapter, so lets get started.

open up your interfaces file by using the following cmd:

sudo gedit /etc/network/interfaces

My file had the following data written:

auto lo
iface lo loopback

But the logical name of my NIC was ens33 ( not lo), so i changed it to read the following and saved the file.

auto ens33
iface ens33 inet dhcp

Now time to restart the networking service .

sudo /etc/init.d/networking restart

check if network is back up, it shouldn't have that disabled tag anymore.

sudo lshw -C network

Enjoy your internet :)

Abhishek Vij
  • 401
  • 4
  • 4
  • This was very helpful. Solved my exact problem. – sparkonhdfs Jul 11 '19 at 14:54
  • 1
    The file names/content have changed now in 18.04.3- it seems to be have changed its /etc/netplan/50-cloud-init.yaml - the content that I have is `network: ethernets: ens33: dhcp4: true version: 2` so what do we do next – Sam-T Dec 16 '19 at 05:41
  • I have a virtual machine with 18.04.3 LTS and the above answer still holds true. Do you mind sharing the path of interfaces file ? – Abhishek Vij Dec 31 '19 at 21:56
  • 3
    My host os is ubuntu 18.04 and guest os is ubuntu 18.04. I did this and it does not work. then in `vmware -> virtual machine settings` I changed to `bridge mode` and restarted the networking service in guest os (`sudo /etc/init.d/networking restart`). And it works. – mahfuz Feb 24 '20 at 14:55
  • netplan users use `sudo netplan apply` after changing the configuration file. – gerardw Apr 09 '20 at 18:20
  • Thanks a lot.....You are a life saver....I will share this answer in stackoverflow as well. Although this change was required ===> vmware -> virtual machine settings ==> changed to bridge mode – Harshit Pant Oct 23 '20 at 04:05
  • Great answer, this has fixed multiple VMs for me where I have no clue why the networking isn't going. – user37309 Jan 22 '21 at 05:11