Search code examples
linux-kernelvmwarevirtualizationvirtualboxwireless

How to make VirtualBox or VMware (or any other virtualization software) to use a native guest network driver?


I don't know if what I want to achieve is actually feasible or not. I have an RTL8192CE wireless network Mini PCI card, which definitely doesn't work properly on Linux (running Ubuntu 12.04 64-bit (Precise Pangolin)). I have already tried everything I could think of: I downloaded the latest drivers from the Realtek homepage, tried using NDISwrapper with several different sets of Windows drivers, and also tried using generic wireless backports, etc. None of it solved my problem.

It does, on the other hand, work perfectly on Windows... I dual-boot Windows 7 and Ubuntu 12.04, both 64-bit. Apparently, there is a bug in Ubuntu related to this card.

I want to know whether there is a way to use a virtualized Windows installation (Windows XP or Windows 7, preferably not Windows Vista) under my Ubuntu 12.04 64-bit that uses a native Windows driver (since the network card works perfectly in Windows). The virtualization software can be either VirtualBox (prefered), VMware or any other. There isn't any problem if I have to manually configure that by shell scripting or anything similar.

So, to make it clearer, I have a VirtualBox installed in my Ubuntu 12.04 (my host), which I use to run Windows 7 (my guest). I wanted to know whether this virtualized (guest) Windows 7 could have "direct" access to my wireless interface -- such as the dual-booted Windows 7 I have installed, without passing through the Ubuntu drivers.

Apparently I could not achieve that by using VirtualBox's guest additions, could I?

PS: I believe none of VirtualBox's networking modes (NAT, bridged networking, internal networking and host-only networking) would allow me to do that, am I correct? How could I solve that problem?


Solution

  • What you are asking for is called PCI Passthrough in VirtualBox - and it should be considered a very advanced topic. I have experimented with this feature before in VirtualBox and VMWare ESXi (make that vSphere...) and it can be extremely fragile.

    I would suggest you spend some time reading the VirtualBox manual section on this (Chapter 9: Advanced Topics), there are some limitations you will want to be aware of as well as just know that this is an area of virtualization that is very young and immature. Off hand, here are some of the rather strict requirements before you can even begin:

    • Your hardware must have an IOMMU (Intel calls it VT-d, AMD -> AMD-Vi)
    • Your guest must be configured with hardware assist enabled (VT-x or AMD-V)
    • Your host Linux kernel must be built to utilize the IOMMU hardware

    If your hardware/software meets those rather strict guidelines, give it a shot. What will happen is your guest will be effectively given direct access to your wireless PCI card and it will show up directly as a PCI device to your guest. You will install and use the drivers exactly as you would if Windows were your host operating system instead of your guest.

    Reference - Chapter 9: Advanced Topics - PCI Passthrough https://www.virtualbox.org/manual/ch09.html#pcipassthrough