Ubuntu – How to connect to internet from Ubuntu which is installed in a virtual machine using VMWare Workstation

internetinternet connectionubuntu-9.04virtual machinevmware-workstation

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?

Best Answer

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.

Related Question