Cannot setup PCI Passthrough for display adapter in VirtualBox

10,175

According to the manual this is only supported on Linux hosts:

http://www.virtualbox.org/manual/ch09.html#pcipassthrough

[EDIT - I also confirmed with the VBox dev team. This is not supported (and still experimental even on Linux)]

Share:
10,175

Related videos on Youtube

Anshul
Author by

Anshul

Updated on September 18, 2022

Comments

  • Anshul
    Anshul almost 2 years

    VirtualBox supports PCI Passthrough and I'm trying to attach my graphics card to the guest OS (host is Windows Server 2012 and guest is Windows 8.1 Professional - so they should both work with the same driver). I've followed the directions at http://howtoware.blogspot.com/2012/01/oracle-vm-virtualbox-how-to-use-pci.html (which are the same directions as in the VirtualBox manual) to set it up. Problem is at this step:

    VBoxManage modifyvm "VM name" --pciattach 02:00.0@01:05.0

    This command attaches the device at [PCI Bus 2, Device 0, Function 0] in the host to [PCI Bus 1, Device 5, Function 0] in the guest. What destination (guest) address (PCI bus, device, function) should I be using to attach the display adapter from my host to my guest? I've tried a bunch of different addresses but VirtualBox reports back with the following errors:

    1. If I attach to a device address that does NOT exist on the guest, I get this error:

      Failed to open a session for the virtual machine WIN8A.
      
      A virtual device is configured in the VM settings but the device implementation is missing.
      
      A possible reason for this error is a missing extension pack. Note that as of VirtualBox 4.0, certain features (for example USB 2.0 support and remote desktop) are only available from an 'extension pack' which must be downloaded and installed separately (VERR_PDM_DEVICE_NOT_FOUND).
      
      Result Code: E_FAIL (0x80004005)
      Component: Console
      Interface: IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}
      

      I have made sure that VirtualBox extensions for my version of VirtualBox (4.2.xxx) is installed.

    2. If I attach it to a device address that DOES exist on the guest, I get this error (looks like someone forgot to read the comments in the error definitions >_>):

      Failed to open a session for the virtual machine WIN8A.
      
      General failure - DON'T USE THIS!!!. (VERR_GENERAL_FAILURE).
      
      Result Code: E_FAIL (0x80004005)
      Component: Console
      Interface: IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}
      

    The VM is powered off for both these operations and I've already tried doing this with a brand new VM with Windows 8 (the VM doesn't even start even with a brand new machine).

    I've searched for this exception but haven't had any luck. Maybe some VirtualBox expert out there has some answers? Thanks.

    • Ramhound
      Ramhound over 10 years
      Does your CPU have the required virtualization extensions in order to support this new feature?
    • Anshul
      Anshul over 10 years
      @Ramhound I believe so. It says so on the Intel site for my processor: ark.intel.com/products/50067
    • Anshul
      Anshul over 10 years
      But I'm not sure if my BIOS has it enabled or not. Any idea how I could check that? I used CPU-Z and it does NOT list VT-d in the "Instructions" box, but I was not sure if that's supposed to appear there or not.
    • Ramhound
      Ramhound over 10 years
      Your second response to my original question seem to indicate you were not sure if your hardware supported VT-d thus I told you to make sure it doesn. Which is the reason updates like that should be included in the question itself. So your hardware supports the required virtualization extensions. Have you tried using Hyper-V instead by chance? This could be an issue with Virtualbox itself.
    • Anshul
      Anshul over 10 years
      No I haven't tried Hyper-V yet. I will try that later when I get home. The reason I said I wasn't sure is that even if the hardware supports VT-d, the BIOS could have it disabled, which could explain why VT-d not in the list of "Instructions" in CPU-Z results.
    • Anshul
      Anshul over 10 years
      Also my BIOS has no option to enable/disable any virtualization features, but I've requested an updated BIOS from the manufacturer and hopefully they have something more up to date that allows control over virtualization features.
    • Ramhound
      Ramhound over 10 years
      I can't say for certain but I am pretty sure in general if your CPU supports it then your motherboard has to provide it.
    • Anshul
      Anshul over 10 years
      @Ramhound Do you know of any way to directly test for VT-d by any chance?
    • steve cook
      steve cook over 10 years
      @Anshul you can use the VirtualBox API (though it sometimes gets confused if your CPU supports VT-x, but it's disabled in the BIOS)
  • Anshul
    Anshul over 10 years
    It does say that the Linux kernel must be compiled with IOMMU support, but I suppose it doesn't explicitly say anything about Windows. I'll assume your explanation is correct as I have not been able to find any other resolutions to this issue. When I have a chance, I'll test out a Linux kernel.