Ubuntu – Wireless card isnt working with Ubuntu 14.04 VirtualBox Guest OS


I have set up ubuntu 14.04 on virtual box and its my first time using this os. My wireless adapter is intel centrino wireless-N2230 802.11n. It works fine on my windows 7 host.I tried to download its driver for linux and add it to /lib/firmware but it was already there.
I have seen some command lines here and there but with no use.

lspci output from the Ubuntu VM:

00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
00:03.0 Ethernet controller: Advanced Micro Devices, Inc. [AMD] 79c970 [PCnet32 LANCE] (rev 40)
00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest Service
00:05.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01)
00:06.0 USB controller: Apple Inc. KeyLargo/Intrepid USB
00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:0d.0 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 02)

If you need more outputs please be detailed about how to get it.

Best Answer

If you want to be able to have Linux work with the actual hardware on your OS, you want to boot to a Live USB or actually install Ubuntu to the hard drive, as VirtualBox doesn't pass the wireless adapter hardware information to the guest OS. It doesn't do that because the guest shouldn't be the one to control the wireless adapter of the host, in an idea setup. As the Windows 7 host which is running VirtualBox accesses the wireless adapter, the network adapter on the guest OS (in this case, Ubuntu) is virtual and does not control your wireless adapter. Essentially, unless you're running an oddball configuration, VirtualBox runs everything that it runs as guests through virtual network adapters which eventually go out through the active network connection on the host OS. That's effectively like this:

Very rough diagram of how VirtualBox networking works

Some explanation:

  • All the VirtualBox guest VMs in a typical setup go through the VBox network interfaces. To that end, you can have multiple virtual interfaces on a guest which then in turn each access a different virtual network interface. This can be used to have a firewall or gateway box between some VMs and the host OS adapter on the way out to the internet.
  • VirtualBox Virtual Network Interfaces are essentially network adapters that exist virtually. They don't physically exist, but exist as part of VBox. Each VBox interface typically has its own subnet of addresses, and they typically don't communicate between each other, except in advanced setups. These are exposed to the Virtual Machines, when the VM is set up to have a network interface connected to one of these virtual network interfaces. The host hardware is not exposed/shown to the guest OSes as a result, only these virtual interfaces.
  • VBox Bridged is connected (virtually, aka 'bridged') to one individual interface and your guest effectively has access to the hardware interface that is hooked up to the Bridged connection and can use that network interface as if it were its own and a separate connection, so rather than an internal IP address. This does not, however, disclose the type of 'host' network interface in use, whether ethernet or wifi, so it just appears as an 'ethernet connection' to the guest OS, because it still goes through a virtual network interface.
  • VBox NAT runs your data through one or more active host OS Network interfaces. To that end, your guest OS gets a private internal IP address that works only within the VirtualBox network. You can then specify port forwarding rules (NAT rules) which can allow for your computer and a specific port to be reached and then forwarded to the internal guest OS.
  • VBox Virtual Network indicates a virtual network adapter which can be its own segregated network. Typically you can use this to isolate internal networks, or you can run a VM as a 'gateway' (or 'firewall', such as a pfSense instance), and then use the Virtual Network as all the guest OSes that run through that virtual 'gateway'. This is advanced though. (Most simple VM setups will just use the NAT or Bridged setups)
    • Typically, these network interfaces aren't set up to go right to the hardware on the host, but you can create multiple "bridged" connections in theory and each virtual network adapter would then be bridged differently with a different hardware interface on the host OS, but that's an atypical setup.

Note that an alternative way to get a wifi adapter onto the guest VM is to get an external USB wifi adapter, and connect it to the VM via USB Passthrough, but that can be tricky and painful to configure at times in some hosts, and varies a little from host-to-host (which is why I do not detail it here).

Related Question