Do I Need Linux Drivers For Virtual Box?

I have recently fallen in love with Linux. I first decided to try out Ubuntu 13.10 a few weeks ago, but I bricked it by incorrectly installing an AMD FGLRX driver. Then I reformatted and wiped that partition to try out Linux Mint 16. I did the same thing with Mint, as well as with Fedora 20, 19, and 18 (in that order). Now I am on a stable Ubuntu 12.04 because I know how to use it vastly more than the other distros I've tried and because it seems like it has the biggest online support group.

Because I am now tired of reformatting and reinstalling broken distros, I thought it would be a good idea to get at least one distro stable (Precise) and to test the driver installations and other risky modifications for that distro and others with them running in Oracle Virtual Box since I don't trust my Linux skill (lack?) at the moment. This way, I optimize the distros in the Box, take a "snapshot" like saving a video game, and try out the risky operations. If they fail and I break the distro, I can just open the snapshot up and go back to where I was right before the risky operation.

While this still seems like the best idea so far, I have noticed that the distros I have installed on Virtual Box report that I am NOT using my computer's actual hardware, and am actually using Virtual Box's "hardware", for instance, the "Innotek Systemberatung GmbH VirtualBox Graphics adapter.

Because of that adapter, my test graphics installations do not work properly. Even the operations I know would brick the distro with a black screen are not working. "My adapter is incompatible," FGLRX installation says, in the GUI version of installation (one of many methods).

My questions are: Can I not install these drivers inside of Virtual Box? Do I need some additional software? Is there any other virtual environment I could use for testing these distros that would result in a 100% identical virtual installation?


I am using the notoriously Linux-unfriendly Acer Aspire 5553G, which has "switchable graphics". Those cards are the Mobility Radeon HD 4250 and 5470. The driver's I have tested so far work in Windows 7, yet do not in Linux.

Thank you all in advance!


The short answer is no, you don't need extra drivers for Virtual Box.

The Virtual Box (or any any virtual machine software) creates a virtual computer with virtual hardware that are completely compatible with Linux. This means the virtual computer will have the same virtual graphics card irrespective of the actual graphics card in your computer. In theory, you should be able to copy your virtual installation of Ubuntu into another computer with a completely different graphics card and run is there, after installing the virtual machine software there.

In your case, inside the Virtual Box, there is no Mobility Radeon HD 4250 and 5470. These cards don't exist in the virtual world. Only the virtual card virtually manufactured by Virtual Box is there. This virtual card has open source Linux drivers. So when you install Ubuntu inside the Virtual Box, it only sees the virtual card. Ubuntu won't install the FGLRX driver which is for AMD Radeon cards as it can't see the AMD cards that are there in the real PC, but does not exist in the virtual PC.

The downside of using a virtual machine is that you won't be able to use the full capability of your graphics card inside the virtual machine. The virtual graphics card inside the virtual machine is likely to be less capable.

Hope this helps.


Short answer: Depend on what you intend with drivers. Anyway, the virtual machine will be of no use to test "native" graphic drivers for your physical PC.

Long answer:

when you install Virtualbox it will add a couple of drivers to your physical machine. You can see these by lsmod:

(0)pern:~% lsmod | grep vbox
vboxpci                22896  0 
vboxnetadp             25636  0 
vboxnetflt             27291  0 
vboxdrv               285210  3 vboxnetadp,vboxnetflt,vboxpci

(more or less) which are the drivers that the virtual machines will use to share the memory, network and physical resources of your real computer with the virtual machines. You cannot run VirtualBox without them.

When you install a Virtual Machine (being that one a Linux one or a Windows one), VirtualBox will simulate a completely standard hardware drivers. So normally you can run the virtual machine "out of the box" with the standard, basic drivers that are present in any distribution.

Your original graphic hardware is invisible from the virtual machine (as your real network driver, wifi driver, etc). So you can't test the original graphic drivers in it, sorry.(1)

But that way the performance of some things (graphic card, basically) will be horrible; the installed distro will use the default "vga" drivers which have no acceleration whatsover. So VirtualBox will prompt you to install the "VirtualBox Additions" in the virtual machine. Do that if you want a reasonable graphic performance; these drivers will not touch your physical computer.

References: https://www.virtualbox.org/manual/ch04.html

Notes: (1) the only exceptions is for USB devices that you can "pass" transparently to the virtual machine (you need the non-free extension pack to handle USB 2.0, though).