Maybe it would be useful to have a INSTALL.KVM? It would be the same as INSTALL.Linux, except for at the end, a description of using the custom ifup and ifdown scripts on the kvm command line.
Also, I am in the middle of doing some benchmarking for my research. I did a quick comparison of standard bridging to open vswitch using iperf that showed no degradation from open vswitch in the tests I have ran so far (bridge in base to remote linux, KVM guest to remote linux, and KVM guest to base bridge). I am using Open vSwitch version 1.0.0 in my tests. I want to add more cases, such as applying flow control rules to guests and connecting to a remote guests on vswitches, and guest to guest on the same vswitch. I can post more details and scripts if people are interested. Thanks, Todd On Fri, May 14, 2010 at 12:58 AM, Martin Casado <[email protected]> wrote: > It would be great to turn this, or something similar, into a usage guide for > inclusion in the ovs documentation. > >> Hi Praveen, >> >> On Thu, May 13, 2010 at 5:52 PM, Praveen Reguraman <[email protected]> >> wrote: >> >>> >>> Hi Todd, >>> I mentioned that librvirt also uses a tap interface and hence, >>> needs some check related to tun module. >>> >> >> I didn't run into this problem with the tun module. Did you install >> uml-utilities? >> >> Also, see below. I did a very quick proof of concept setup of a KVM >> guest that uses an ovs bridge. >> >> >>>> >>>> I'll make an attempt today or tomorrow and try to post a quick howto. >>>> >>>> >> >> sudo apt-get install kvm uml-utilities >> >> mkdir ~/src >> cd ~/src >> wget http://openvswitch.org/releases/openvswitch-0.99.2.tar.gz >> tar xf openvswitch-0.99.2.tar.gz >> cd openvswitch-0.99.2/ >> sudo apt-get install build-essential autoconf automake pkg-config >> libssl-dev iproute tcpdump linux-headers-`uname -r` >> ./configure --with-l26=/lib/modules/`uname -r`/build >> sudo insmod datapath/linux-2.6/openvswitch_mod.ko >> sudo touch /usr/local/etc/ovs-vswitchd.conf >> >> ***In a new terminal window run this command*** >> sudo ovs-vswitchd --pidfile --log-file --detach -v >> /usr/local/etc/ovs-vswitchd.conf & >> ###NOTE, leave this terminal open, debug output will show up here### >> >> ***continuing on the original terminal*** >> sudo /etc/init.d/network-manager stop >> sudo /etc/init.d/networking stop >> sudo ifconfig eth0 up >> sudo ifconfig eth0 0.0.0.0 >> sudo ovs-vsctl add-br externalbr >> sudo ovs-vsctl add-port externalbr eth0 >> >> #These two will give you a sense of what has been created >> sudo ovs-dpctl show externalbr >> sudo ovs-ofctl show externalbr >> >> #Just to have the example contained, let's put it in a directory of its >> own >> mkdir ~/ovs >> cd ~/ovs >> >> #create two files. In this example, I use cat to create them. >> cat > externalbr-ifup >> #!/bin/sh >> >> switch='externalbr' >> /sbin/ifconfig $1 0.0.0.0 up >> ovs-vsctl add-port ${switch} $1 >> <CTRL-D> >> >> cat > externalbr-ifdown >> #!/bin/sh >> >> # NOTE: This script is intended to run in conjunction with externalbr-ifup >> # which uses the same logic to find your bridge/switch >> >> switch=externalbr >> ovs-vsctl del-port ${switch} $1 >> /sbin/ifconfig $1 0.0.0.0 down >> <CTRL-D> >> >> wget >> http://mirror.clarkson.edu/ubuntu-releases/10.04/ubuntu-10.04-desktop-i386.iso >> sudo kvm -net nic,macaddr=00:11:22:CC:CC:CC -net >> tap,script=externalbr-ifup,downscript=externalbr-ifdown -cdrom >> ~/ubuntu-10.04-desktop-i386.iso & >> >> #When running these this time, notice the addition of the tap0, that's >> the interface given to the kvm guest >> sudo ovs-dpctl show externalbr >> sudo ovs-ofctl show externalbr >> >> Your newly booted kvm (liveCD) guest will have bridged networking. >> >> That concludes this very basic usage of ovs and a KVM guest. >> >> In future howtos, I'll look further at things like: >> sudo ovs-ofctl dump-flows externalbr >> >> And other ovs-ofctl actions like: >> >> add-flow SWITCH FLOW add flow described by FLOW >> add-flows SWITCH FILE add flows from FILE >> del-flows SWITCH [FLOW] delete matching FLOWs >> >> >> Hope that helps. >> >> Questions and comments are welcome. >> >> Thanks, >> Todd >> >> > > -- Todd Deshane http://todddeshane.net http://runningxen.com _______________________________________________ discuss mailing list [email protected] http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org
