I have installed Ubuntu 9.04 on a virtual machine using VMWare Workstation. I have Windows 7 as my host OS.

I want to connect to internet from Ubuntu. Can anyone please gives steps for connecting to internet through guest OS?

6 Answers 6


My solution was to delete and readd the network interface:

  1. Shutdown your VM
  2. Go to "Edit Virtual Machine Settings" and remove your network adapter
  3. Boot your VM and turn it off
  4. Open the .vmx file with your editor and delete all lines which start with "ethernet0"
  5. Boot your VM and turn it off
  6. Go to "Edit Virtual Machine Settings" and add a new network adapter
  7. Boot your VM and open a terminal
  8. Execute ip link. The output shows all the interfaces like this:
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: ens33: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
        link/ether 00:0c:29:a5:cd:b6 brd ff:ff:ff:ff:ff:ff
  9. Find your interface (ens33 in my case) and set it to up:
    sudo ip link set ens33 up
  10. Let your interface search an IP Address:
    sudo dhclient ens33 -v

Worked with Windows 10 Host, Ubuntu 19.10 Guest and VMware Workstation 15 Player.

  • 1
    This works perfectly on linux host / ubuntu 18.04 too.
    – Ohiovr
    Commented Apr 8, 2020 at 21:18
  • 1
    This also worked on windows 10 Host, Ubuntu 20.04 Guest and VMware Workstation 15 Player Commented Oct 27, 2020 at 18:17
  • Thank you very much. Worked perfectly!
    – ArgonQQ
    Commented Mar 5, 2021 at 8:59
  • The above instruction also helps me to get the interface up and obtain an IP. But after a reboot, the interface went down again
    – some user
    Commented Mar 24, 2021 at 5:41
  • 1
    Only steps 8 and 10 were needed in my case Commented Jan 24 at 1:55

In your VMWare, go to Edit>Virtual Network Edits and create an add a new Network of type NAT.

Now, on your host goto Control Panel > Network & Sharing Center > Change Adapter Settings and look for your current connection that has internet access.

Right-click the network connection and go under Sharing. Allow the sharing and choose the NAT Network from the drop-down.

Now, on VMWare, go to the settings of Virtual Machine. Under Network, choose Custom Network and select the same NAT connection. Now, reconnect to check if the connection is established.

Reference [Video]: How to setup Internet Connection for Virtual Machines in VMWare


Have you enabled a network adaptor in the VM settings? NAT is the simplest option but bridged mode just as easy to set up if you have a DHCP server running on the network.

Is the network running in the guest? Do you have an IP address? If not:

sudo /etc/init.d/networking restart

If you have an IP address in the guest it could the firewall on the host is causing the problem.

  • I get an error: stop: Job failed while stopping start: Job is already running: networking Commented Mar 31, 2015 at 18:45
  • In my case the issue was on the avast firewall which I had to switch it to "private" network instead of "public.
    – thanos.a
    Commented Dec 6, 2020 at 17:22

Workstation sets up bridge network VMnet0 for Bridge Networking for the guests. Bridged networking connects a virtual machine to a network by using the network adaptor on the host system. You can enable it by right click on your Ubuntu Virtual Machine or VM>Settings click on Network Adaptor and select Bridged, restart the guest if needed.

  • No, restarting doesn't do anything. Commented Mar 31, 2015 at 18:47
  • The bridged option should work, I've done the same thing with many Virtual Machines and they've worked fine. Have you checked the state of the network adapter within Ubuntu? Try something like "ip link" and check the state of your ethernet adapter, it'll probably be something along the lines of "enp---", check if the state is UP or DOWN. If its down, do a "sudo ip link set up xxx" where xxx is the adapter name. And then pull a "sudo systemctl restart dhcpcd", and give it a little time and see if anything happens. Commented Feb 9, 2016 at 14:52
  • Select Bridged on VMvare
  • Install "VMware Bridge Protocol" to wireless adapters settings on PC.
  • Restart VMware

So I am running Ubuntu version 22 on VM Workstation 16 Player running NAT network adapter that kept on dropping, and would need to constantly do @bb1950328's answer above to get it to run again but then I entered sudo dhclient ens33 into the command line and it would be able to reconnect automatically. When the VM later refroze I needed to reenter sudo dhclient ens33 but it reconnected right away. Hope this helps someone else.

  • Welcome to SuperUser! How is this better than the top answer? Commented Dec 9, 2022 at 15:39
  • 1
    Before answering an old question having other answers ensure your answer adds something new or is otherwise helpful in relation to them. Here is a guide on How to Answer. There is also a site tour and a help center. Commented Dec 9, 2022 at 16:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .