Creating a VM with PCI Passthrough - Not Working

erf89

New Member
Oct 25, 2024
2
0
1
Hi All

I'm new to Proxmox, I've been running Unraid bare-metal for the past year, but wanted to move to Proxmox as my main hypervisor, and run Unraid as a VM for my NAS.

I want to pass through my drives, and (for now) my GPU as well - long term I intend to just run Unraid as NAS Only, and run another VM/CT Containers for other services, but just to get me started I just want to get unraid back up and running as it was, and I can slowly migrate services away from it.

I've made a VM for Unraid, passed through the USB and set it as the first boot item - if I run that VM as is, success, I get Unraid up (but clearly no array).

My current planned pass-through devices:

Arc GPU (00:03:00)
Intel iGPU (00:00:02)
NVMe to SATA Adapter (has it's own IOMMU group, 21) (00:07:00) - this has my 5 HDD's
1TB NVMe Drive (also has it's own IOMMU group, 20) (00:06:00) - unraid cache drive

But with these devices passed through, I just get time-outs from vnc and the VM won't start, or it goes into a cycle of starting and then stops with error messages.

Code:
kvm: ../hw/pci/pci.c:1637: pci_irq_handler: Assertion `0 <= irq_num && irq_num < PCI_NUM_PINS' failed.
TASK ERROR: start failed: command '/usr/bin/kvm -id 101 -name 'unraid,debug-threads=on' -no-shutdown -chardev 'socket,id=qmp,path=/var/run/qemu-server/101.qmp,server=on,wait=off' -mon 'chardev=qmp,mode=control' -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' -mon 'chardev=qmp-event,mode=control' -pidfile /var/run/qemu-server/101.pid -daemonize -smbios 'type=1,uuid=4baa5a9a-057c-4268-9a74-c45acc962b90' -smp '8,sockets=1,cores=8,maxcpus=8' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vnc 'unix:/var/run/qemu-server/101.vnc,password=on' -cpu host,+kvm_pv_eoi,+kvm_pv_unhalt -m 32768 -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'vmgenid,guid=d253c4dd-51b4-4f5c-a4a4-558e51f9cccc' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'qemu-xhci,p2=15,p3=15,id=xhci,bus=pci.1,addr=0x1b' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'vfio-pci,host=0000:07:00.0,id=hostpci0,bus=pci.0,addr=0x10' -device 'usb-host,bus=xhci.0,port=1,hostbus=1,hostport=7,id=usb0,bootindex=100' -device 'VGA,id=vga,bus=pci.0,addr=0x2' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:229c5c16b84f' -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=101' -netdev 'type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown' -device 'e1000,mac=BC:24:11:F0:57:00,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=102' -machine 'type=pc+pve0'' failed: got timeout
 
Assertion `0 <= irq_num && irq_num < PCI_NUM_PINS
some users encounter this,
(e.g. see https://forum.proxmox.com/threads/gpu-passthrough-ends-up-with-pci_num_pins-error.143481/
https://forum.proxmox.com/threads/problems-with-gpu-passthrough-since-8-2.145917/ )

we could not reproduce it here yet, but it seems to be either a hardware or kernel issue, so e.g. did you already try to update the bios/firmware of your mainboard or try a different (older kernel version?) ?
 
It might be your host is using the GPU. Did you blacklist all drivers for the host to be loaded?

1. Please passthrough the USB boot disk first and see if it can be booted correctly. It should work properly.
2. Next pass through the disk array (sata controller pci) etc. and test if it works ok.
3. Then passthrough the discrete GPU following the guide and test if works for you.
4. iGPU is for the next level.

So what steps are you up to at this moment?
Can you try an old kernel? For the host, it's better to use old dumb kernel for passing through, so it doesn't have native driver support (You need to blacklist them anyway). Otherwise, it might hold control to the hardware and will cause issues on passthrough.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!