PCI Device with vlan and bridge

May 1, 2022
66
9
13
Stockholm, Sweden
Hello

Today I have a Mellanox Virtual Function as a NIC via a PCI Device on one of my virtual machines.
But I wonder how I can choose what vlan to use? The physical card it self has a OpenVswitch bridge (vmbr0) with two vlan (1 and 51).
I don't see any option via the web-ui, do I need to use qm?
 
Not sure if I understand the complete situations
but if you passthrough a PCI virtual function to your guest - your guest has a NIC inside - you need to configure any VLAN you need in the guest on that NIC

I hope this helps!
 
It would be nice if it could be handled the vlan via KVM/qm
This is just not how this works - PCI-Passthrough means you do pass through a pci-device to your guest - which sees it as regular pci device

you can and should configure your switchports to only allow the relevant VLANs, and or install some device in front of the PVE node which handles the allowed vlans/mac-address