Enable passthrough of main/primary GPU in XenServer 6.5SP1

In its default config XenServer 6.5 will not permit you to use your host server’s primary GPU in a VM as a passthrough device. That’s reasonable in most cases, as reusing this GPU leaves the dom0 without output. However, passing through the device works nonetheless in many cases – your mileage may vary.

To convince XenServer to let you freely assign the GPU to VMs add this line to the file /etc/udev/rules.d/05-udev-early.rules:

KERNEL=="vga_arbiter", OPTIONS="ignore_device"

Reboot the server, that’s it.

9 thoughts on “Enable passthrough of main/primary GPU in XenServer 6.5SP1

  1. not working after selecting the gpu it tells me this: “You attempted to run a VM on a host which doesn’t have I/O virtualization (IOMMU/VT-d) enabled, which is needed by the VM.” but VT-d is enabled

  2. Hi randomguy,

    You can check if Xen properly recognized your hardware capabilities by looking into /var/log/xen/hypervisor.log on the XenServer. Look out for lines like these:

    [2016-03-03 16:38:52] (XEN) [ 0.583986] Intel VT-d iommu 0 supported page sizes: 4kB, 2MB, 1GB.
    [2016-03-03 16:38:52] (XEN) [ 0.584812] Intel VT-d Snoop Control enabled.
    [2016-03-03 16:38:52] (XEN) [ 0.585099] Intel VT-d Dom0 DMA Passthrough enabled.
    [2016-03-03 16:38:52] (XEN) [ 0.585416] Intel VT-d Queued Invalidation enabled.
    [2016-03-03 16:38:52] (XEN) [ 0.585729] Intel VT-d Interrupt Remapping enabled.
    [2016-03-03 16:38:52] (XEN) [ 0.586042] Intel VT-d Shared EPT tables enabled.
    [2016-03-03 16:38:52] (XEN) [ 0.593020] I/O virtualisation enabled

  3. Hi Justin,

    Thanks for posting this tip. Absolutely awesome! I had a feeling there was a way around dom0 monopolizing the graphics card.

    I used your instructions to pass through a NVIDIA Quadro 2000 to a Windows 7 VM on an HP Z620. There was one gotcha during the setup:

    XenServer allowed Windows 7 VM to start normally once the Quadro 2000 card was chosen for passthrough. This allowed for NVIDIA driver installation. However, on restart of the Windows 7 VM to complete NVIDIA driver installation the entire system was taken down because the NVIDIA driver was not active and the VM was trying to use the GPU. To get around this I disabled the NVIDIA card via Device Manager and restarted the Windows 7 VM. This allowed the Windows 7 VM to complete the NVIDIA driver installation process. After that, I was able to use the NVIDIA card.

    Also, I tried to disable the “Standard VGA Graphics Adapter” to clean up the devices list but that ended up crashing the system as well. So, there are some loosed ends that need cleaning up in XenServer but passthrough appears to work. There’s so much junk on the net regarding passthrough that it’s tough to know if it actually works or not.


  4. This does not seem to work anymore on Xenserver 7. Both of my servers used to pass their cards just fine on 6.5. Any ideas of getting it working again in 7?

  5. Thanks for sharing this information. I currently do not have the possibility to play around with XenServer 7. If you found out how to get passthrough of the primary GPU going again, this would be highly appreciated.


  6. This worked great for me with XenServer 6.5. I can now pass the HDMI signal straight out of the VM and onto my TV using an inexpensive Radeon HD 6XXX series GPU. Thanks for the info.

  7. How can this be done on xenserver 7.0? The file 05-udev-early.rules is not available in xenserver 7. Thanks for helping!

  8. Was anyone able to pass through the iGPU on an AMD APU like Raven Ridge?

Leave a Reply

Your email address will not be published. Required fields are marked *