[PVE-User] How to specify VLANs for a trunk interface into the VM
josh at noobbox.com
Mon Aug 6 18:57:40 CEST 2018
I don't see a way to do this via the GUI for the VM interface.
You can use that same command you listed but on the tap interface tapXiY
where X is the VM ID and Y is the interface number. E.g. tap100i1 would be
interface 1 of VMID 100. That will restrict the allowed VLANs on that
port, but of course that doesn't stick around after a reboot, ovs has no
'startup config'. But it should be obvious which IDs to use if you take a
look at the list of interfaces on the host with `ip link | grep tap`.
Or you can do something like this. But either way, the ovs-vsctl command
ovs-vsctl add port tapXiY trunks 20
ovs-vsctl add port tapXiY trunks 30
ovs-vsctl add port tapXiY trunks 40
Another thing to consider however, is by default, the ovs trunk port will
allow all VLANs. In your VM if you create subinterfaces like eth0.20,
eth0.30, eth0.40, then you'll have access to each specific VLAN without
having to configure allowed vlans in ovs. It depends on your use case.
On Mon, Aug 6, 2018 at 11:25 AM, Klaus Darilion <
klaus.mailinglists at pernau.at> wrote:
> I have a trunk into my Proxmox server with plenty of vlans, into OVS
> bridge vmbr0.
> How can I configure a trunk into a VM and specify the allowed VLANs? The
> GUI dialog only allows to specify a single VLAN tag (which causes the
> interface to be an OVS access port).
> I need to configure an OVS port like:
> ovs-vsctl set port XXX trunks=20,30,40
> Any chance to configure this via GUI or console?
> pve-user mailing list
> pve-user at pve.proxmox.com
More information about the pve-user