Wireless Network in Virtualbox

To make it a short answer: It's a network issue.

The way I see the scenario is like this:

enter image description here

Now to correctly see where the problem is, in this case, we need to first check from the outer networks to the inner networks.

  1. Make sure the router has internet. You can use the same host or another device connected to it to check this.

  2. Make sure the Host has internet via the Router or any other source. To check simply send a ping to google.com for example like so: ping google.com.

If Point 1 and 2 are good (Your router is working great and has internet and your host has internet) then we proceed with the Guest and Virtualbox. It may be good to read how Wireless support is handled in VirtualBox by reading Wifi card on an virtualbox's ubuntu

We need to know the following information first:

  • There is no wireless connection inside the virtualbox environment. All "virtual" connections are in reference to cable/wired connected ones. So when you enable a Network card in your virtual guest, it is a virtual wired connection you are creating not a virtual wireless one.

  • The virtual connection from Host to Guest is independent of the type of connection your Host is connected to (Physically connected). If the host is connected via a wired or wireless connection, it does not matter or affect the virtual connection made from the Host to Guest because wired and wireless connections are used in the same way inside the Guest. Something similar to the following image:

    enter image description here

  • If your host does not have internet access, your guest will not have it. The same goes that if your host has internet access and your connection from Host to Guest permits sharing the internet, then the guest will most probably have internet also (Default behavior with Virtualbox).

  • I will be using Virtualbox 4.1.20 which looks different from the one you are using (Might be same, I do not know). I will add the network image just to help and show the differences:

    enter image description here

  • I will be using Ubuntu 12.04 as host and as Guest (This works the same in 12.10 or 13.04). In cases where Windows is the host you need to make sure the firewall is not blocking a particular port the guest will be using.

  • I assume that the Host is not using a proxy, just connected directly to the router via a wireless/wired connection.

  • The output from the Guest is the following with ifconfig and route:

    enter image description here

Now to the points you want to solve:

  1. Configure the network for the VM Ubuntu Server
  2. Get VM to connect to internet
  3. Get router to see the VM

Let me first mention that point 3 will be impossible unless the Virtualbox guess supports port forwarding. Your router will only see transfers made from your Guest as if they were transfers made from the actual Host. So without forwarding (Which is somewhat supported on the latest version) the router will never see the VM, only the Host.

There are of course ways to go around this like telling the host to forward stuff to the guest via the virtualbox engine. Or configuring (Easier I think) the guest for port forward. For example this:

enter image description here

So with this in mind we do the following in the Guest:

  1. Test if the guest has Internet access with the common ping google.com approach.

    If ping works then we know that an internet connection exists. The problem might be resolving the destination site.

  2. Try the following:

    /etc/init.d/network restart and/or dhclient

  3. Verify that /etc/network/interface is correct. My example would be:

    enter image description here

  4. Change the Adapter Type in the Network Options in the Virtualbox Configuration Window.

  5. Test out if the Ubuntu Desktop client or another OS works correctly. (Right now I only have the Desktop iso image of 12.10 and 12.04).


This is most definitely a network issue. To confirm that, try first pinging IPs inside your local network:

ping 10.1.1.1

(which is likely to be your router's IP)

and then pinging IPs in the "outside world"

Also, even if you're running your VM on a laptop which connects via wifi, you don't need to configure wifi on the guest machine - VirtualBox emulates a "wired" network adapter, so your guest OS thinks it runs on a machine which is connected to LAN with a cable.

Configuring networking in VirtualBox is a broad topic (although typical setups normally work out of the box), you need to make sure your VM has a network adapter configured in VM's properties etc.

See http://www.virtualbox.org/manual/ch06.html for more details.

The default VirtualBox setup (NAT) creates a "private" network between your host and guest machines, with the host machine forwarding all traffic coming from the guest machine outside and sending responses back to the guest (similarly to how your router connects your laptop to Internet). The guest does not have an individual IP address in your LAN and can not be accessed from outside your laptop, but you can access Internet from the guest because packets are translated into the LAN by the host machine and then into internet by the router. This explains why you don't see a separate device in your router's settings