PCI Passthrough and NIC's

GastonJ

Member
Aug 22, 2022
26
3
8
Hello all. I have Virtual Environment 7.2-7 installed. The server has 3 NICS,

The onboard on a fixed IP address (eno1), and an Intel dual NIC that I use exclusively for my VM installation of PFSense - so the 2 ports on that card use PCI passthrough (enp1s0f0 and enp1s0f1).

All was great and everything has been working well for the last month after I installed pfsense. I came to restart the server yesterday evening and pfsense had lost a network card, so wouldn't boot. On taking a look from the O/S one of the NICS I was passing through had obtained an IP address from my DHCP server - that was why passthrough didn't work, pfsense couldn't see my second NIC, and therefore wouldn't start correctly.

I used

ifdown enp1s0f0

to unassign the IP, then restarted the pfsense VM and all was well in that both NICS were passed through.

Any idea how to stop enp1s0f0 and enp1s0f1 being assigned an IP by Debian prior to me starting the pfsense VM please?

00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04) = en01
01:00.0 Ethernet controller: Intel Corporation 82575EB Gigabit Network Connection (rev 02) = enp1s0f0
01:00.1 Ethernet controller: Intel Corporation 82575EB Gigabit Network Connection (rev 02) = 1s0f1

1664440688166.png

Thanks
 
Thanks for that, I've set up a new conf

root@pve:/etc/modprobe.d# cat pfsense-nic.conf
options vfio-pci ids=01:00.0,01:00.1

I won't know the driver to blacklist until I restart and watch the card get enabled again. Though for now I have set my pfsense VM not to autostart, so at least I can get that done this evening with very few problems.

Regards,

Pete
 
Adding that should be enough, since those IDs are now bound to vfio-pci. So no kernel module or driver will be initialized for your NIC and it will be free to be used for passthrough.
 
  • Like
Reactions: GastonJ
@mira Do device addresses also work for this? Or are the actual device IDs needed, like described in the documentation?
Thanks for this! Yes, the actual device IDs are needed:
Code:
parm:           ids:Initial PCI IDs to add to the vfio driver, format is "vendor:device[:subvendor[:subdevice[:class[:class_mask]]]]" and multiple comma separated entries can be specified (string)

This means options vfio-pci ids=01:00.0,01:00.1 has to be replaced by the actual ID of the device.
 
  • Like
Reactions: GastonJ and Neobin
Thanks for this! Yes, the actual device IDs are needed:
Code:
parm:           ids:Initial PCI IDs to add to the vfio driver, format is "vendor:device[:subvendor[:subdevice[:class[:class_mask]]]]" and multiple comma separated entries can be specified (string)

This means options vfio-pci ids=01:00.0,01:00.1 has to be replaced by the actual ID of the device.

Thanks for clarification. :)
 
Hello all. I have Virtual Environment 7.2-7 installed. The server has 3 NICS,

The onboard on a fixed IP address (eno1), and an Intel dual NIC that I use exclusively for my VM installation of PFSense - so the 2 ports on that card use PCI passthrough (enp1s0f0 and enp1s0f1).

All was great and everything has been working well for the last month after I installed pfsense. I came to restart the server yesterday evening and pfsense had lost a network card, so wouldn't boot. On taking a look from the O/S one of the NICS I was passing through had obtained an IP address from my DHCP server - that was why passthrough didn't work, pfsense couldn't see my second NIC, and therefore wouldn't start correctly.

I used

ifdown enp1s0f0

to unassign the IP, then restarted the pfsense VM and all was well in that both NICS were passed through.

Any idea how to stop enp1s0f0 and enp1s0f1 being assigned an IP by Debian prior to me starting the pfsense VM please?

00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04) = en01
01:00.0 Ethernet controller: Intel Corporation 82575EB Gigabit Network Connection (rev 02) = enp1s0f0
01:00.1 Ethernet controller: Intel Corporation 82575EB Gigabit Network Connection (rev 02) = 1s0f1

View attachment 41736

Thanks
Hi, I know is a lot later to reply to this thread, I stumbled across this while searching the forum. I have what it seems like a very similar setup regarding the network as you explained here. I can't have the proxmox console connected to internet though ( although pfSense works just fine and whatever is on LAN side with pfsense DO have internet access ). Would you mind explaining ( maybe screenshot ) how you set networks on proxmox side to have internet access? Thank you!