After 2 days I FINALLY got GPU passthrough to work... On an ancient card...
-
I've managed to pass through an Nvidia Quadro P2000 as well as a TV Tuner to a Ubuntu VM for Plex transcoding and free to air TV.
I'm now trying to pass through a graphics card to a Windows VM for personal cloud gaming. After 2 days I've finally managed to get an ancient AMD 6870 to work! But I'd like to figure out why the other cards don't work.
System specs:
AMD Ryzen 5700G
Gigabyte X570 UD
64GB DDR4 RAM
Nvidia Quadro P2000
Hauppauge WinTV QuadHD
[plus a random graphics card]According to Nvidia a GTX 760 SHOULD be able to be used in a virtual Windows environment since Nvidia driver 465. Upon installing the card and adding it to my Windows VM I can see the card in the device manager with the default Windows drivers installed and it seems to be functioning normally. However when I attempt to install the Nivdia drivers I then get the Code 43 issue. I tried multiple driver versions after 465 with no luck.
When I try the same in a Ubuntu VM it sees the card but it doesn't load the driver. Nvidia-SMI says no devices detected.
Eventually I gave up on the Nvidia card and decided to try an R9 270 from AMD, however with this card the host crashes when attempting to install the GPU drivers on Windows... Tried multiple driver versions but can't seem to keep the host stable when the card attempts to initialise.
I found similar threads on here mentioning their host would crash when trying to load GPU drivers:
https://xcp-ng.org/forum/topic/7012/host-crashes-error-43-nvidia-quadro-k2200-pcie-passthrough-to-vm
https://xcp-ng.org/forum/topic/5872/passed-through-gpu-crashes-host-during-driver-install
I've tried updating from XCP-NG 8.2 to 8.3 to see if that helped anything, but I get the same results as before.
I tried a Ubuntu VM with the R9 270 to see if it is just a Windows error, and upon start up is a warning message saying "Unable to locate a bios ROM" and then a fatal error. lspci shows the card and lshw -c video shows the card but it's "unclaimed".
Both cards never showed any output once XCP-NG had booted.
I was ready to completely give up but figured since I already have the chassis open I'll just toss in an old 6870 to see what happens.
Windows 10 immediately recognises the device in device manager rather than displaying as a "Basic Adapter", which isn't too surprising given its age. I installed the drivers, plugged in a monitor and bam, it was displaying the Windows desktop!
So out of 3 cards I managed to get only 1 working. I'd like to figure out WHY these other cards don't work as the entire point of this is to put in a more capable card in the near future, but obviously I'm not keen on buying a card that may not even work if I can only get 1/3 cards working.
Any ideas on what I can try to get this working more reliably with more modern graphics cards? The main difference I can think of between the cards is that the 6870 has 1GB VRAM while the GTX 760 and R2 270 both have 2GB VRAM. The Quadro P2000 has 5GB of VRAM, but being a workstation card perhaps Xen has better support for it.
Happy to provide any logs, etc, that would be useful.
==UPDATE==
My brother had a spare GTX 1060 6GB card. I put that in and it worked right away. Now able to Stream games from the VM to the TV, etc. Awesome! Still a mystery as why the other cards refused to work.