Trying to passthru my RTX 2080 ti to a Windows 7 x64 bit vm using virt-manager on Ubuntu 21.10 : it gives error 12

Hello.

I would like to virtualize Windows 7 x64 bit passing through my graphic card (rtx 2080 ti) with qemu-kvm on Ubuntu 21.10. It’s failing for me,so I’m trying to understand what’s wrong. After several modifications to the xml code of libvirt suggested by a very nice reddit user,that you can read here :

I ended up with this configuration :

https://pastebin.ubuntu.com/p/f2MCTf52xg/

Unfortunately in UEFI mode windows 7 freezes on its logo,even if it able to connect to the net. While in BIOS mode my monitor does not turn on at all.

I’ve installed the ssh server inside windows 7 and from Linux I tried to connect to that server and I’ve issued the following command :

mario@MARIETTO-PC C:\Users\mario>wmic path win32_videocontroller get configmanagererrorcode
ConfigManagerErrorCode
0
12

because I wanted to check the status of my graphic card inside windows 7. I mean,which error it shows. As u can see it seems to be 12. So,it seems that my rtx 2080 ti even without the default graphic adapter (-vga none),it does not work,reporting error 12.

Error 12 : The “This device cannot find enough free that it can use (Code 12)” problem is displayed within the device’s properties windows in the Device status box. That error is usually a hardware conflict which arises when two devices are assigned the same I/O port but there are other culprits as well.

At beginning I’ve thought that the error 12 was caused by the presence of the default graphic display adapter,but it seems that the cause is another one,because it is still present if I use “-vga none”.

I’ve googled a little bit and maybe I found the fix for this error in this site :

https://ubuntuforums.org/showthread.php?t=2414098

where he says :

My system has a very similar setup that was giving me the same code 12 error. I have been able to able to get it working with the following setting in virt-manager: CPUs → Model → Haswell-noTSX-IBRS Using the “Copy host CPU configuration” appeared to give me issues.

even if I’m not sure that it will fix the error,I tried,but another error happened :