NIC PCIe-Passthrough

evgenijp

Member
May 19, 2021
9
0
6
41
Hallo zusammen,

ich versuche für opnsense-vm eine NIC durchzureichen, dabei habe ich mich an die Proxmox und Thomas Krenn HowTo's orientiert.
IOMMU ist aktiviert und die Kernelmodule sind geladen
Code:
root@proxmox:~# dmesg |grep -e DMAR -e IOMMU -e AMD-Vi
[    0.935824] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
[    0.938685] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[    0.938686] pci 0000:00:00.2: AMD-Vi: Extended features (0x58f77ef22294a5a):
[    0.938687] AMD-Vi: Interrupt remapping enabled
[    0.938740] AMD-Vi: Lazy IO/TLB flushing enabled
[    0.939388] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
root@proxmox:~# lsmod | grep vfio
vfio_pci               53248  0
vfio_virqfd            16384  1 vfio_pci
irqbypass              16384  2 vfio_pci,kvm
vfio_iommu_type1       32768  0
vfio                   32768  2 vfio_iommu_type1,vfio_pci

Die Netzwerkkarte, welche durchgereich werden soll, sitzt auf dem Bus 05:00.0 und ist in der Gruppe 14:
Code:
root@proxmox:~# lspci | grep Ethernet
05:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
06:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
06:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
2a:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Device 8125 (rev 04)
root@proxmox:~# find /sys/kernel/iommu_groups/ -type l | grep '05:00.0'
/sys/kernel/iommu_groups/14/devices/0000:05:00.0

Die VM ist wie folgt eingerichtet:
1622743418318.png

Das Problem ist, dass meine Proxmox-Umgebung scheinbar die Netzwerkverbindung verliert sobald ich die VM starte. Laut der FM im Tasks-Log konnte aber auch die VM nicht gestartet werden:
Code:
TASK ERROR: unable to activate storage 'hdd-data' - directory is expected to be a mount point but is not mounted: '/mnt/pve/hdd-data'
Ohne das "PCI Device" Startet die VM ganz normal. Hat jemand eine Idee was hier falsch läuft?
 
Hängt noch etwas anderes in Gruppe 14 oder an Bus 05:XX:X?
Die NIC die du durchreichen willst hast du nicht noch in /etc/network/interfaces stehen oder?
 
Last edited:
I migrated a truenas vm from esxi to proxmox.

It uses onboard sata in passthrough mode.

Had difficulty getting the vm to start when the onboard sata was passed through. Would get hung up after grub. Changing from seabios to uefi resolved.
 
Hi, ja - leider ist da einiges in der Gruppe 14:
Code:
root@proxmox:~# for i in $(find /sys/kernel/iommu_groups/ -type l | grep 14 | awk -F'/' '{print $NF}');do lspci -s $i; done;
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61)
03:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43ea
02:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43e9
02:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43ee
03:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43ea
03:09.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43ea
04:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1)
06:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
02:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] Device 43eb
05:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
04:00.0 VGA compatible controller: NVIDIA Corporation GK208 [GeForce GT 710B] (rev a1)
03:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43ea
2a:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Device 8125 (rev 04)
06:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)

Und nein, in /etc/network/interfaces steht die NIC nicht drin.

Hey das1996, thanks for you advise. I think the problem here is a little different. As soon as I try to star the VM, I lose the connection to the host. Thanks for your tip though, I changed the BIOS to UEFI.
 

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!