Update: Proxmox 6 now has built-in support for this! If you’re getting “Duplicate ID ‘ich9-pcie-port-5’ for device”, be sure to remove any additions you’ve made to /usr/share/qemu-server/pve-q35-4.0.cfg
By default in Proxmox 4.4 and 5, you are unable to pass through more than 4 PCIe devices to the guest. If you try, you’ll get an error when attempting to start the VM which reads:
vm 100 - unable to parse value of 'hostpci4' - unknown setting 'hostpci4'
Passed-through PCIe devices are attached to the four ports called “ich9-pcie-port-{1,2,3,4}” which are defined in /usr/share/qemu-server/pve-q35.cfg
. These ports occupy PCIe function numbers 0-3, leaving function numbers 4-7 unused.
It’s a simple matter to add definitions for an extra 4 ports to use up those spare function numbers in /usr/share/qemu-server/pve-q35.cfg
(Proxmox 4 and 5): Continue reading Passthrough more than 4 PCIe devices to Proxmox 4 and 5 guests