Hi,
I am not great at documentation but I wanted to forward this step by step as it 
makes it easy to upgrade from bridge-utils to open vswitch on KVM/libvirt 
hypervisors on Ubuntu 12.04
Feel free to use it however you wish, I am releasing it to the public domain.
How to upgrade to openvswitch on an Ubuntu 12.04 host running libvirt.This is 
how you can replace the normal bridge-util package in Ubuntu 12.04 with the new 
Open vswitch soft switch, it is running in compatibility mode but once libvirt 
has native support it will be trivial to add.This guide is written with the 
assumption that you have a management interface on a seporate interface than 
the one that is to be used by guests.If you have ebtables installed remove it# 
aptitude purge ebtablesDestroy the default libvirt net if virbr0 exists (check 
with ifconfig -a)# virsh net-destroy default# virsh net-autostart --disable 
defaultStop libvirt and qemu to make sure they do not bring up the legacy 
bridge.# service libvirt-bin stop# service qemu-kvm stopInstall Openvswitch 
from the ubuntu apt repositories# aptitude install openvswitch-switch 
openvswitch-controller openvswitch-brcompatIf the DKMS module build fails you 
will need to fix those issues before moving forward Edit the default file for 
openvswitch-switch to enable the bridge compat# tail -n 1 
/etc/default/openvswitch-switchBRCOMPAT=yesRestart the services and make sure 
they start fine # service openvswitch-switch restart# service 
openvswitch-controller restartReboot and make sure the brcompat_mod loads# 
lsmod | grep brcombrcompat_mod 13512 0 openvswitch_mod 83993 1 brcompat_modFor 
default libvirt compatibility in our environment we need to name the bridge 
“br0” although this is a virtual switch and not a bridge.Create bridge named 
“br0”# ovs-vsctl add-br br0Connect bridge “br0” to the physical interface 
“eth4”# ovs-vsctl add-port br0 eth4Add a virtual bridge device named “br10” for 
untagged vlan 10 traffic on bridge “br0”# ovs-vsctl add-br br10 br0 10Check to 
see that the bridges exist # ovs-vsctl list-brbr0br10OK our bridge devices 
exist, lets add some dummy entries in /etc/network/interfaces so that they are 
“UP” in the eyes of libvirt.We need to edit /etc/network/interfaces to add some 
entriesauto eth4iface eth4 inet manualup ifconfig $IFACE 0.0.0.0 updown 
ifconfig $IFACE downauto br0iface br0 inet manualup ifconfig $IFACE 0.0.0.0 
updown ifconfig $IFACE downauto br10iface br10 inet manualup ifconfig $IFACE 
0.0.0.0 updown ifconfig $IFACE downThese bring up the interfaces with No IP 
address, now if you run ifconfig -a they should be visible.Once you have a 
guest up on br0 or br10 you will see a “vnet0” interface.                       
              
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to