Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

PCI nic Passthrough

mikegleasonjr

Neophyte
Joined
Sep 14, 2020
Messages
5
I have trouble getting a passthrough nic to be recognized in a guest VM (both BSD and Linux).

Running TrueNas release 12. I have 3 nics, 1 onboard and a dual nic card. All Intels.

So I have em0 (onboard), em1 (dual nic 1), em2 (dual nic 2). I am trying to passthrough em2.

What I did:

1. Followed the steps here to ensure I have virtualization enabled:
https://wiki.freebsd.org/bhyve/pci_passthru

2. Added relevant loader configs after determining the PCI device id:
Screen Shot 2020-10-23 at 2.36.16 PM.png


3. Verified that the device is available as a passthrough (em2 became ppt0):
Code:
% pciconf -lc
...
em1@pci0:1:0:0:    class=0x020000 card=0x7044103c chip=0x105e8086 rev=0x06 hdr=0x00
    cap 01[c8] = powerspec 2  supports D0 D3  current D0
    cap 05[d0] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[e0] = PCI-Express 1 endpoint max data 128(256)
                 link x4(x4) speed 2.5(2.5) ASPM disabled(L0s)
    ecap 0001[100] = AER 1 0 fatal 1 non-fatal 0 corrected
    ecap 0003[140] = Serial 1 002655ffffd4d732
ppt0@pci0:1:0:1:    class=0x020000 card=0x7044103c chip=0x105e8086 rev=0x06 hdr=0x00
    cap 01[c8] = powerspec 2  supports D0 D3  current D0
    cap 05[d0] = MSI supports 1 message, 64 bit
    cap 10[e0] = PCI-Express 1 endpoint max data 128(256)
                 link x4(x4) speed 2.5(2.5) ASPM disabled(L0s)
    ecap 0001[100] = AER 1 0 fatal 1 non-fatal 0 corrected
    ecap 0003[140] = Serial 1 002655ffffd4d732


4. Created a VM (Tried pfSense and a generic Linux Distro) and assigned the passthrough device (of course, not at the same time):
Screen Shot 2020-10-23 at 2.44.10 PM.png


5. Booted the VM
I can't see a nic.

One thing I suspect is that I see an error in the pciconf -lc output for the passthrough device:

Code:
   ...
    ecap 0001[100] = AER 1 0 fatal 1 non-fatal 0 corrected
   ...


But I don't know how to debug that one out.

Thanks for your help!
 

Kennyvb8

Member
Joined
Mar 18, 2017
Messages
110
got same issue, only with VGA/GPU, the wiki is old, and alot of freebsd forums claim they bhyve can do vga/gpu now anyway, but just tried nic, same results as you
 
Top