Pass trunk to VM

Apr 9, 2025
4
0
1
I want to set up a trunk on my switch and create a bridge in Proxmox that I can assign to a VM. Within the VM, I want to be able to treat the interface as though it is directly connected to the switch, with the trunk available. Then I want to be able to create sub interfaces on the VM on different VLANs.

I could pass the NIC through to the VM instead of creating the bridge, but I want to be able to do this with more than one VM.

So before I go down the rabbit hole, I wanted to see if anyone else has already accomplished this setup.

Switch config:

interface ethernet 2/25
switchport mtu 9216
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40,50
 
What's the use case? I think you will need to pass more than just the trunk. I think you will also need to pass through a tagged interface so that you can access the VM operating system
 
I want to set up a trunk on my switch and create a bridge in Proxmox that I can assign to a VM. Within the VM, I want to be able to treat the interface as though it is directly connected to the switch, with the trunk available. Then I want to be able to create sub interfaces on the VM on different VLANs.

I could pass the NIC through to the VM instead of creating the bridge, but I want to be able to do this with more than one VM.

So before I go down the rabbit hole, I wanted to see if anyone else has already accomplished this setup.

Switch config:

interface ethernet 2/25
switchport mtu 9216
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40,50
You need to configure the bridge in proxmox as "vlan aware" and config the virtual ethernet without tag.

I works like a charm.

Bruno