RHEV upgrade saga: RHEL KVM and the Open vSwitch


If libvirtd is not running use the following to start immediately and to ensure it starts at boot.

# service libvirtd start
# chkconfig libvirtd on

Under normal circumstances, KVM starts with its own bridge named default, which is actually virbr0, if we are going to use the openvswitch, it is best to remove that bridge. First we need to see what bridges/networks exist. By default, it is fine to have this bridge also available as it becomes an internal only network using non-openvswitch constructs.

	# virsh –c qemu:///system net-list –all
Name                 State      Autostart     Persistent
default              active     yes           yes
# ifconfig –a |grep br0
virbr0    Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX  
virbr0-nic Link encap:Ethernet  HWaddr YY:YY:YY:YY:YY:YY

Now let's talk configuration, since this is the main reason for using openvswitch. We want the configuration to include an uplink from the physical devices to the openvswitch, then a link from the openvswitch to the Dom0 OS, and finally a link to each VM hosted. To complicate matters we need to have this done on two distinctly different networks. So how did we proceed?

First we need to configure Openvswitch, which goes along with Scott's article. First we configure the BRCOMPAT setting, which is commented out by default:/p>

# echo “BRCOMPAT=yes” >> /etc/sysconfig/openvswitch

Then start the openvswitch service(s) and configure them to start on reboot as well:

# /sbin/service openvswitch start
# /sbin/chkconfig openvswitch on

Check to see if KVM is running and openvswitch is installed properly, first by ensuring libvirtd is running properly and if the openvswitch components are loaded as modules and that the servers are running properly.

# virsh –c qemu:///system version
Compiled against library: libvirt 1.0.1
Using library: libvirt 1.0.1
Using API: QEMU 1.0.1
Running hypervisor: QEMU 0.12.1
# lsmod |grep brcom
brcompat 5905 0
openvswitch 92800 1 brcompat
# service openvswitch status
ovsdb-server is running with pid 2271
ovs-vswitchd is running with pid 2280

Now we need to create some openvswitches with some bonding thrown in for redundancy and bandwidth requirements. We also create a ‘named’ port on the openvswitch for our internal network.

Join us:






Answers - Powered by ITworld

Ask a Question