How to use NVIDIA GeForce M310 on Ubuntu 12.10 running as guest in VirtualBox?

PCI passthrough

PCI passthrough is experimentally supported in recent Virtual Box closed source (PUEL) versions. However there are several limitation, i.e. for a graphics card we can read from the Virtual Box User Manual:

AGP and certain PCI Express cards are not supported at the moment if they rely on GART

I cant tell if this is the case with the Nvidia M310, you will have to figure this out first before you try.

To get PCI passthrough working we also need a motherboard with an enabled IOMMU from BIOS settings (i.e. VT-d for Intel, AMD-Vi for AMD).

There are several additional prerequisites to be met (see Virtual Box Manual for details):

  • Your motherboard has an IOMMU unit.
  • Your CPU supports the IOMMU.
  • The IOMMU is enabled in the BIOS.
  • The VM must run with VT-x/AMD-V and nested paging enabled.
  • Your Linux kernel was compiled with IOMMU support, DMA remapping, and the PCI stub driver.
  • Your Linux kernel recognizes and uses the IOMMU unit.

We can then attach a PCI device with its bus:device.function properties read from lspci to our virtual machine using:

VBoxManage modifyvm "VM name" --pciattach <host-bus>:<host-device>.<host-function>@<guest-bus>:<guest-device>.<guest-function>.

See in the guest with lspci if the device was attached properly before installing drivers for this device.

Please also refer to the Virtual Box Manual for further limitations.


As of 2016 it is fully implemented but for Linux guests experimental.

The PCI passthrough module is shipped as a VirtualBox extension package, which must be installed separately. See Section 1.5, “Installing VirtualBox and extension packs” for more information.

Essentially this feature allows to directly use physical PCI devices on the host by the guest even if host doesn't have drivers for this particular device. Both, regular PCI and some PCI Express cards, are supported. AGP and certain PCI Express cards are not supported at the moment if they rely on GART (Graphics Address Remapping Table) unit programming for texture management as it does rather nontrivial operations with pages remapping interfering with IOMMU. This limitation may be lifted in future releases.

Source: VirtualBox manual