PCIe passthrough will just not work

Chemist_in_vain

New Member
Feb 7, 2025
3
0
1
Good day dear hive mind!

I am currently trying to figure out how to get my windows 7 VM running with my GPUs I am trying to pass through but I just dont get it to work. The VM works perfectly fine with non of the GPUs selceted as primary GPU and the display being set to standard. Also I seem to have to run it with SeaBIOS because apperantly Windows 7 doesnt support OVMF (UEFI). Again the VM works fine that way. But when I select the GPU as primary i get following error:

Code:
error writing '1' to '/sys/bus/pci/devices/0000:0f:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:0f:00.0', but trying to continue as not all devices need a reset
error writing '1' to '/sys/bus/pci/devices/0000:42:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:42:00.0', but trying to continue as not all devices need a reset
kvm: -device vfio-pci,host=0000:0f:00.0,id=hostpci0,bus=pci.0,addr=0x10,x-vga=on: vfio 0000:0f:00.0: failed getting region info for VGA region index 8: Invalid argument
device does not support requested feature x-vga
TASK ERROR: start failed: QEMU exited with code 1


The drivers of the GPUs have been blacklisted:

Code:
root@proxmox:~# cat /etc/modprobe.d/blacklist.conf
blacklist radeon
blacklist nouveau
blacklist nvidia
blacklist nvidiafb


The config of my VM when I chose primary GPU looks like that:

Code:
root@proxmox:~# qm config 105
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'
balloon: 0
boot: order=ide1
cores: 8
cpu: host,hidden=1,flags=+pcid
hostpci0: 0000:0f:00.0,x-vga=1
hostpci1: 0000:0f:00.1
hostpci2: 0000:42:00.0
hostpci3: 0000:42:00.1
ide0: none,media=cdrom
ide1: machines:105/vm-105-disk-0.qcow2,size=32G
ide2: cdrom,media=cdrom
machine: q35
memory: 8096
meta: creation-qemu=9.0.2,ctime=1737294085
name: win7
net0: e1000=BC:24:11:71:8E:A3,bridge=vmbr0,firewall=1
numa: 0
ostype: win7
scsihw: virtio-scsi-single
smbios1: uuid=d0a41302-cd1b-4732-81c0-383c960e9dd6
sockets: 1
vga: none
vmgenid: 333f52ce-4213-4be6-8698-af5738844daf


Is there anything I am doing substantially wrong? I have to admit I am quite a newby so surely there is a lot I am doing wrong. But do you guys have any guesses what it is?
I ahve to mention that I installed the drivers for the GPUs already on the VM. Also those are two GPUs (MSI Geforced GTX 970 and ASUS Geforce GTX 970) with SLI bridges. Is there another config I have to set for the SLI bridge?
Also interesting is that, when I don't select primary GPU but set the display to none, then the starts to run but can not boot up (it has a static IP address and I cant remote access it unlike before with display being set to standard).


Hope you guys can help me out!
Thanks in advance!
 
Again the VM works fine that way. But when I select the GPU as primary i get following error:
is there any reason why you want to do this then? x-vga=on does some things during vm bootup due to legacy vga/bios initialization that might not be necessary (but was at one point in time). if it works without that setting, just leave it off.

Is there anything I am doing substantially wrong?
the only thing in the config i can see that is probably unnecessary is:

args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'

IMHO this should not be necessary anymore, since nvidia fixed the vendor_id stuff quite a while ago, and the other settings should be already set with your remaining config