Unable to access internet on Vmware

50,182

Solution 1

Edit the file /etc/network/interfaces and add these lines:

# The primary network interface
auto ens33
iface ens33 inet dhcp

ens33 is the logical name of the NIC and may be different for other operating systems.

Don't change anything of the loopback interface.

Save the file and run sudo ifup ens33.

Solution 2

I had the same issue. I have removed all the network cards and readded them - not sure if this was a requirement but after I did that I decided to reinstall the VM Player. Then downloaded VMPlayer and ran the installer. I chose Repair then restarted the host machine.

Share:
50,182

Related videos on Youtube

13aal
Author by

13aal

Updated on September 18, 2022

Comments

  • 13aal
    13aal over 1 year

    I have a Windows 7 host, and Ubuntu 16.04 as a guest operating system over VMware, I've been trying for a few days and have been unable to access the internet over the guest operating system.

    My current configuration looks like this:

    VM => Settings: enter image description here

    Network Editor: enter image description here

    ifconfig command from the Ubuntu desktop: enter image description here

    ipconfig command from the Windows 7 host desktop: enter image description here

    Interfaces file from /etc/network

    # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    iface lo inet loopback
    

    My question being, is there something simple that I'm missing here that will not allow me to connect to the internet?

    • Admin
      Admin almost 8 years
      you have no gateway, add your host as gateway on the guest VM, or change from NAT to bridged.
    • Admin
      Admin almost 8 years
      add your host as gateway on the guest VM What do you mean?
    • Admin
      Admin almost 8 years
      @warhansen, how did you infer this?
    • Admin
      Admin almost 8 years
      Your default gateway is empty on the iconfig. On you Linux host add: gateway xxx.xxx.xxx.xxx which is the Host's IP. Because your host is NAT'ed it will do the rest
  • foobarbecue
    foobarbecue about 7 years
    This worked for me! OP should select it as correct answer.
  • Mr Neo
    Mr Neo about 7 years
    this worked for me, too. You saved my days
  • shapiro yaacov
    shapiro yaacov over 6 years
    Finally a solution that works!!
  • Marnix A.  van Ammers
    Marnix A. van Ammers over 5 years
    I had to add ens34 and that did the trick. Thank you, thank you!