This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Virt Manager VLAN ===== ==== Install open vswitch ==== Install and create bridge: <code> sudo apt-get install openvswitch-switch sudo ovs-vsctl add-br virbr2 sudo ovs-vsctl add-port virbr2 enp0s31f6 </code> ==== Create libvirt network with vlan ==== Create a file test.xml: <code> <network connections='2'> <name>vlan42</name> <uuid>04a64a40-f1b8-48f6-a396-7a4e83f25826</uuid> <forward mode='bridge'/> <bridge name='virbr2'/> <virtualport type='openvswitch'/> <portgroup name='vlan-all' default='yes'> <vlan trunk='yes'> <tag id='42'/> <tag id='802'/> <tag id='803'/> <tag id='804'/> <tag id='805'/> </vlan> </portgroup> </network> </code> Import and create file: <code> sudo virsh net-create test.xml sudo virsh net-start vlan42 sudo virsh net-autostart vlan42 </code> ==== On virtual machine ==== <code> sudo nmcli con add type vlan ifname VLAN42 dev enp7s0 id 42 sudo nmcli con mod vlan-VLAN42 connection.autoconnect yes sudo nmcli con mod vlan-VLAN42 ipv4.method manual ipv4.addresses 192.168.100.2/24 </code> ==== References ==== * https://www.netflask.net/transparent-vlan-tagging-libvirt-ovs/ * http://docs.openvswitch.org/en/latest/intro/install/debian/