pfSense does not see my NIC's, but Windows VM does


pankleks

Recommended Posts

  • 1 month later...

try this. Using same bus but different function value.

 

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x2'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x2'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x3'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x3'/>
    </hostdev>

 

  • Like 1
Link to comment
  • 4 months later...
On 12/29/2019 at 3:15 AM, ZaFord said:

Hi, I came here looking for an answer to this exact problem.

My test H/W is a little different:

Optiplex i5 7010, 16gb RAM with HP Quad port server NIC.

pfSense is not seeing any of the NIC's when passed through, but Windows 7 Pro is.

 

I also removed the quad card from the PC and tried using just the builtin Intel NIC,

but in my case pfSense doesn't see the br0 or the virbr0 NIC's either.

I'm using using pfSense 2.4.4.iso and Unraid 6.8.0 trail, both downloaded today.

 

I have the same problem (1 year later ;]). 

I'm using pfsense 2.5 and Unraid 6.9.0-rc2.

I have a lot of PCIE NIC's that I passthrough to VM and that works fine. 

 

But I have problem if virtual interface, virtio-net is not detected by pfsense. Did you find solution to this problem ? I plan to use pfsense inside Unraid and have pfsense interface via virtual NIC.

Link to comment
  • 4 months later...

Hey everyone,

 

I had a similar issue. I'm using a DELL R720 with a Broadcom quad NIC. For some reason only two of the four NICs was present in the pfSense VM, but all for was present in other (Windows, Ubuntu) VMs. I've tried everything mentioned in this thread but I couldn't solved the problem. Let me document my issue then provide a solution:

 

Unraid: v6.9.2

pfSense: v2.5.1

 

My NICs and IOMMU groups:

2043940238_kp.thumb.png.212e8c99d5d76856ee85efe7cdb8c6fe.png

 

The solution was to modify the the XML of my VM the following way:

<hostdev mode='subsystem' type='pci' managed='yes'>
  <driver name='vfio'/>
  <source>
    <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
  </source>
  <alias name='hostdev0'/>
  <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0' multifunction='on'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
  <driver name='vfio'/>
  <source>
    <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
  </source>
  <alias name='hostdev1'/>
  <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x1'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
  <driver name='vfio'/>
  <source>
    <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
  </source>
  <alias name='hostdev2'/>
  <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0' multifunction='on'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
  <driver name='vfio'/>
  <source>
    <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
  </source>
  <alias name='hostdev3'/>
  <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x1'/>
</hostdev>

 

Please note: for the first two hostdev entry I use the same domain-bus-slot combination with a different function id and added the multifunction property. For the next two NIC I did the same but with a differet bus id.

 

Hope this will help somebody, I spent some days to figure it out. :)

 

If somebody could tell WHY this helped it would be appreciated, because I'm an Unraid noob, and I would like to learn. :)

 

Best regards,

Csard

Edited by csard
Reformatting XML
Link to comment
1 hour ago, csard said:

If somebody could tell WHY this helped

Usually it's good practice to respect the topology of the host also in the vm: so if you have a multifunction device in the host you want to passthrough then set it to a multifunction device too.

It's not important (usually) to not respect the bus/slot, but in most cases multifunction vs non multifunction device matters.

In your case, as you already noticed that you have 2 different iommu groups, each with a multifunction device in the host.

The usual case is the gpu and audio passthrough (and may be some usb/serial controllers on the gpu) which are multifunction devices which should put also in the guest as a multifunction device.

I used "should" because sometimes setting them in non multifunction devices (i.e. different buses, different slots) works, but the behavior can be unexpected: for example the driver of a gpu may expect the device on the same bus/slot and different function.

So, as a general rule, as I wrote:

Quote

it's good practice to respect the topology of the host also in the vm

 

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.