[ovs-discuss] Problem with KVM Creating Bridge
Jon
three18ti at gmail.com
Tue Apr 3 11:23:36 PDT 2012
Hello All,
I am attempting to use OpenV Switch as a replacement for the standard
bridge controls for KVM.
After a reboot, I am receiving the following error when attempting to start
my KVM VMs:
root at kitt:~# virsh start solo.rebase.ubuntu-server-11.10-oneiric-x86_64
error: Failed to start domain solo.rebase.ubuntu-server-11.10-oneiric-x86_64
error: Unable to add bridge br0 port vnet0: Invalid argument
I had this problem yesterday, and resolved it by creating the bridge by
running the following commands,
ovs-vsctl add-br br0
ovs-vsctl add-port br0 eth1
When running these commands today, I receive the following errors:
root at kitt:~# ovs-vsctl add-br br0
ovs-vsctl: cannot create a bridge named br0 because a bridge named br0
already exists
root at kitt:~# ovs-vsctl add-port br0 eth1
ovs-vsctl: cannot create a port named eth1 because a port named eth1
already exists on bridge br0
Yesterday, when I ran the ovs-vsctl commands, I was able to successfully
start my VMs, I had a power outage, and the machine was rebooted, today I
am unable to "add the bridge" again, because it already exists, but I am
unable to use the bridge.
I am running Ubuntu 12.04 Server, but am pretty sure this isn't the problem
as it was working.
I followed the instructions found here for installing and configuring OpenV
Switch:
http://blog.allanglesit.com/2012/03/linux-kvm-ubuntu-12-04-with-openvswitch/
Initially, I only was using one NIC, so when I attempted to add the bridge,
I killed my network connection; of course this is a remote machine... :)
Anyway, after rebooting, I still had no network, so I destroyed the bridge
and recreated it using my 2nd NIC Eth1 (Eth2 is management, Eth1 is my
bridge interface; my 2nd NIC is Eth1... it's just the way they are placed
on the chassis), then I was able to successfully start my VM with the
command:
root at kitt:~# virsh start solo.rebase.ubuntu-server-11.10-oneiric-x86_64
Today, after my reboot, it returns an error:
error: Failed to start domain solo.rebase.ubuntu-server-11.10-oneiric-x86_64
error: Unable to add bridge br0 port vnet0: Invalid argument
On a hunch, I recreated my steps from yesterday:
root at kitt:~# ovs-vsctl del-br br0
root at kitt:~# ovs-vsctl add-br br0
root at kitt:~# ovs-vsctl add-port br0 eth1
root at kitt:~# virsh start solo.rebase.ubuntu-server-11.10-oneiric-x86_64
Domain solo.rebase.ubuntu-server-11.10-oneiric-x86_64 started
And success... This is great for now, as my VMs are up and running (and
fortunately this is not a production environment, so I don't have customers
yelling at me), but what happens next time I want to reboot my VM Host
(admittedly it doesn't happen often, but as Ubuntu is still in beta,
updates are more frequent), I really don't want to have to go through this
song and dance every time I reboot...
Initially, I thought it might have something to do with the qemu-ifup
script, because it uses brctl,
#!/bin/sh
nic=$1
if [ -f /etc/default/qemu-kvm ]; then
. /etc/default/qemu-kvm
fi
if [ -z "$TAPBR" ]; then
switch=$(ip route list | awk '/^default / { print $5 }')
if [ ! -d "/sys/class/net/${switch}/bridge" ]; then
switch=virbr0
fi
else
switch=$TAPBR
fi
ifconfig $nic 0.0.0.0 up
brctl addif ${switch} $nic
But after deleting and recreating the bridge, I am not so sure... I would
think that if the /etc/qemu-ifup script was executed, then it wouldn't
matter if I made changes to openvswitch. Admittedly, I don't know enough
about libvert and the way it manages networks to be certain if it is even a
openvswitch problem, can anyone shed some light on the problem?
Thanks for your time,
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/discuss/attachments/20120403/8da980b1/attachment-0001.htm>
More information about the discuss
mailing list