what exactly do I need to configure on Ubuntu18-based QEMU/KVM server to pass a trunk with >1 VLANs to a VM on it? (basically the equivalent of setting VLAN ID to 4095 on a port with ESXi) Some rather complex examples of reportedly achieving that by means of 1 main and >1 aux bridges that I've seen so far don't look optimal at a glance... unless it's the only feasible way with KVM. Many thanks in advance!
1 Answer
To my surprise the following config on the KVM server's trunk interface was enough - we didn't even have do anything to make this new bridge VLAN aware, such as defining any VLANs on it or setting vlan_filtering=1:
brctl addbr br2
brctl addif br2 enp94s0f0
Placing VM's NIC into br2 turns it into a trunk with as many VLANs as defined at the VM itself and the switch that KVM server's enp94s0f0 connects to.