PCIe NIC passthrough

brucexx

Renowned Member
Mar 19, 2015
239
9
83
I am trying to pass through a NIC to one of my VMs. I have one NIC with 4 ports and 1 nic with 2 port which I want to pass through to a VM.

DMAR: IOMMU enabled
DMAR-IR: Enabled IRQ remapping in x2apic mode
DMAR: Intel(R) Virtualization Technology for Directed I/O

I verified my hardware supports it, I have a dell server based on E5 Xeon v2, I also checked the I have the iommu groups isolated, meaning that the two ports card is in the same group (and nothing else is in this group).

I followed the instruction online listing the lspci and lspci -t and updated the VMs config accordingly.

machine: q35
hostpci0: 04:00.0,pcie=1
hostpci1: 04:00.1,pcie=1

where 04:00:0 and 04:00:1 are the PCIe ports of the same NIC.

I can see the card (with 2 ports) passed through to the VM when issued lspci at the VMs terminal:
01:00:0 - Ethernet Controller Broadcom Corporation BCM5720
02:00:0 - Ethernet Controller Broadcom Corporation BCM5720

..but when I try to bring the interfaces up and configure the network I get kernel panic with not syncing, fatal hardware error.

Does anybody have any suggestions of how to fix it or troubleshoot further ?

Thank you
 
Try the following (the second thing in the section of the link):

https://pve.proxmox.com/wiki/Pci_pa...our_PCI_card_address.2C_and_configure_your_VM

This quote is taken from the wiki link. It describes how to define a PCI-device:

If you have a multi-function device (like a vga card with embedded audio chipset), you can pass all functions with
Code:
hostpci0: 01:00.0;01:00.1

According to this paragraph in the wiki, I would guess that this should also work for PCIe-devices. Furthermore you should include the argument
Code:
pcie=1
into the line in your config (to tell Proxmox that this device is a PCIe-device). In your example I think the following oneliner should work:

Code:
hostpci0: 04:00.0,04:00.1,pcie=1

Hope that helps. ;)
 
I tried that with no luck in. Thank you for suggestion tho... I went with a physical server for this machine, the amount of time troubleshooting this was not worth it. One day when the feature becomes easier to implement I will be glad to switch to VM again.
 

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!