Add PCI Device problem

mgsnell

New Member
Dec 5, 2021
9
2
3
75
Hopefully I can clearly explain my situation. I have an intel NIC with 4 ports:
enp4s0f0
enp4s0f1
enp5s0f0
enp5s0f1
When I try to add enp4s0f0 as a pci device all is fine and the vm boots. When I add enp4s0f1to the mix the vm won't boot and when I go back
to enp4s0f1 in the vm instead of being 0000:04:00.1 which it was before I saved it it has reverted to 0000:04:00.0 causing the vm not to boot as the first nic I
added id was 0000:04:00.0. This quirk only effects enp4 as you can see by the attached screen shot. Is this by design or is this an indication of a problem
with my installation that is going to bite me later?
 

Attachments

  • example.png
    example.png
    30.6 KB · Views: 18
If you selected 04:00.1 and enabled All Functions, it will actually store 04:00 and pass both 04:00.0 and 04:00.1. Could this be the case of overlap? I don't think the VM will start properly when passing the same device multiple times.
Can you show the actual configuration file from the /etc/pve/qemu-server/ directory? The output of journalctl -b 0 | grep enp could also be helpful.
 
Attached is the information you requested. This anomaly is not consistent . Last night after trying to add then delete then add then delete I was finally able to get it to work properly (enp4s0f0 and eno4s0f1 side by side). Tried again this morning and it didn't work, I left it that way so these screen shots are with the network config in that state.
 

Attachments

  • journal output.png
    journal output.png
    159.3 KB · Views: 15
  • 2021-12-17_9-14-55.png
    2021-12-17_9-14-55.png
    42.9 KB · Views: 16
  • new-1.jpeg
    new-1.jpeg
    185.5 KB · Views: 14
  • before starting.png
    before starting.png
    47.5 KB · Views: 13
Attached is the information you requested. This anomaly is not consistent . Last night after trying to add then delete then add then delete I was finally able to get it to work properly (enp4s0f0 and eno4s0f1 side by side). Tried again this morning and it didn't work, I left it that way so these screen shots are with the network config in that state.
After re-reading you response several times, I believe you hit on the problem which was caused on my end. I did in fact have the "all function" checked on both enp4 ports. When I unchecked them and then added them they worked as expected.
 
After re-reading you response several times, I believe you hit on the problem which was caused on my end. I did in fact have the "all function" checked on both enp4 ports. When I unchecked them and then added them they worked as expected.
That's why I asked for the configuration file, because it shows this more clearly. I'm glad you got it resolved.

I do have some minor remarks about your VM configuration: You set the OS Type to Linux but pfSense uses FreeBSD. Maybe using Other is more correct? You enabled QEMU Guest Agent, but I'm not sure pfSense has that (installed). You might want to double check this. You're setting it to 2 sockets of 4 cores each. I think 8 virtual CPU's (and also 4GB) is a bit much for a router VM (but I don't know your host hardware). Note that ballooning is not possible when doing PCI passthrough (but you correctly did not enable this).
 
Last edited:
That's why I asked for the configuration file, because it shows this more clearly. I'm glad you got it resolved.

I do have some minor remarks about your VM configuration: You set the OS Type to Linux but pfSense uses FreeBSD. Maybe using Other is more correct? You enabled QEMU Guest Agent, but I'm not use pfSense has that (installed). You might want to double check this. You're setting it to 2 sockets of 4 cores each. I think 8 virtual CPU's (and also 4GB) is a bit much for a router VM (but I don't know your host hardware). Note that ballooning is not possible when doing PCI passthrough (but you correctly did not enable this).
I appreciate you taking the time to point out areas that will improve my installation I am new to Proxmox and what little I know I have gleaned from googling or watching youtube videos not from first hand knowledge. With regards to "Note that ballooning is not possible when doing PCI passthrough (but you correctly did not enable this)." Sometimes I get lucky but most of the time not :)

Again thanks for taking the time to help me.
Regards and Happy Holidays
 

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!