Ubuntu – No internet connection on Virtualbox (Windows 7 as guest, ubuntu 13.04 as host)

13.04internetnetworkingvirtualbox

Internet works perfectly on host (Ubuntu 13.04, 32 bit, fully updated) but cannot connect to internet on guest Windows 7 (under Virtualbox 4.2).
Have tried NAT and Bridge Network – none worked.
I had internet connection in the guest OS a couple of months ago, but I haven't tried the virtualbox since and now it's gone for some reason.
I would be grateful if someone could help me re-connect the windows OS back online (without the need to format my computer or to uninstall and re-install the guest OS).
Thanks!

Best Answer

I was having the same problem on Ubuntu 12.10 64bit using Virtualbox 4.2.22. Here are the steps I took to solve my problem:

  1. Open Virtualbox Manager
  2. Select the machine you cannot get internet on in the left pane
  3. Click the Settings button in the top menu
  4. Click Network in the left pane in the settings window
  5. Switched to Bridged Adapter in the Attached to drop-down menu
  6. Select the name of the network adapter you are currently using on your host machine. I am using wireless so I chose eth0 which is my wireless network adapter. You can check which adapter you are currently using by opening the terminal (CTRL+ALT+T by default) and running ifconfig. It will probably be the eth adapter that shows an inet addr and shows data transfer next to RX bytes.
  7. Under Advanced, make sure the machine is using the Desktop Adapter Type
  8. Under Advanced, make sure Promiscuous Mode is set to Allow All
  9. Under Advanced, make sure Cable connected is checked on
  10. Hit OK to save your changes
  11. Start your VM

At that point you should be able to start a web browser in your VM and get a connection. This video provided the information I listed above, even though they are using a Windows 7 host with a Windows Server guest.

This is an image showing an example of the settings you need (taken from this answer).

Virtualbox Network Settings

Related Question