====== Open Virtual Switch ====== * Install package # apt-get install openvswitch-switch * Use em2 for VM network # nano -w /etc/network/interfaces + auto em2 + iface em2 inet manual + up ifconfig $IFACE 0.0.0.0 up + down ifconfig $IFACE down Reboot or to enable em2 without rebooting # ifconfig em2 up * Configure virtual bridge # ovs-vsctl add-br br0 # ovs-vsctl add-port br0 em2 * Disable default KVM network # virsh net-destroy default # virsh net-deactivate default # virsh net-undefine default * Define OVS networks for KVM I.e. em2 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.