====== Open Virtual Switch ======
* Install package
# apt-get install openvswitch-switch
* Use enp5s0 for VM network
# nano -w /etc/network/interfaces
+ auto enp5s0
+ iface enp5s0 inet manual
+ up ifconfig $IFACE 0.0.0.0 up
+ down ifconfig $IFACE down
Reboot or to enable enp5s0 without rebooting
# ifconfig enp5s0 up
* Configure virtual bridge
# ovs-vsctl add-br br0
# ovs-vsctl add-port br0 enp5s0
* Disable default KVM network
# virsh net-list
Name State Autostart Persistent
----------------------------------------------------------
default active yes yes
# virsh net-destroy default
# virsh net-undefine default
# virsh net-list
Name State Autostart Persistent
----------------------------------------------------------
* Define OVS networks for KVM
I.e. enp5s0 network has untagged and tagged VLANs and we need one network for untagged VLAN and one network for tag 33 VLAN\\
# nano -w ovs-network-V0.xml
ovs-network-V0
# nano -w ovs-network-V33.xml
ovs-network-V33
* Enable networks for KVM VMs
# virsh net-define ovs-network-V0.xml
# virsh net-start ovs-network-V0
# virsh net-autostart ovs-network-V0
# virsh net-define ovs-network-V33.xml
# virsh net-start ovs-network-V33
# virsh net-autostart ovs-network-V33
# virsh net-list
Name State Autostart Persistent
----------------------------------------------------------
ovs-network-V0 active yes yes
ovs-network-V33 active yes yes
You can use these networks in VM configuration from "Virtual Machine Manager" GUI.