[libvirt-users] Libvirt 1.0.5 with Openvswitch 1.11.90: unable to add bridge br0 port vnet0 operation not supported

Howdy, Running the most recent OVS and libvirt I'm running into the following error message with virt-install: root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> ovs-vsctl -V ovs-vsctl (Open vSwitch) 1.11.90 Compiled May 6 2013 22:37:22 root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> virt-install --connect qemu:///system --name DSL2 --ram 1024 --vcpus 1 --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none --network=bridge:br0 --vnc --os-type=linux --cdrom /dev/sr0 Starting install... ERROR Unable to add bridge br0 port vnet0: Operation not supported Domain installation does not appear to have been successful. If it was, you can restart your domain by running: virsh --connect qemu:///system start DSL2 otherwise, please restart your installation. root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> ovs-vsctl del-port br0 vnet0 root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> libvirtd --version libvirtd (libvirt) 1.0.5 root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> virsh --version 1.0.5 root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> virt-install --connect qemu:///system --name DSL2 --ram 1024 --vcpus 1 --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none --network=bridge:br0 --vnc --os-type=linux --cdrom /dev/sr0 Starting install... ERROR Unable to add bridge br0 port vnet0: Operation not supported Domain installation does not appear to have been successful. If it was, you can restart your domain by running: virsh --connect qemu:///system start DSL2 otherwise, please restart your installation. root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> ovs-vsctl show b81788a2-f45d-4fad-aad2-f423e6e70bad Bridge "br0" Port "eth1" Interface "eth1" Port "br0" Interface "br0" type: internal Port "tap0" Interface "tap0" root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5> Even if I create a new OVS switch I get the same result: root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> ovs-vsctl add-br b1 root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> virt-install --connect qemu:///system --name DSL2 --ram 1024 --vcpus 1 --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none --network=bridge:b1 --vnc --os-type=linux --cdrom /dev/sr0 Starting install... ERROR Unable to add bridge b1 port vnet0: Operation not supported Domain installation does not appear to have been successful. If it was, you can restart your domain by running: virsh --connect qemu:///system start DSL2 otherwise, please restart your installation. root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> Nothing in the openvswitch log file (OVS itself works fine, I can start VMs with the kvm command line). Any clues? I'm not too sure how to trace libvirt calls to OVS (according to the release notes, versions 1.0+ of libvirtd should work with OVS. Note: I am not using brcompat, I believe it's obsolete in the OVS version I'm running). Thanks, Chris.

On 05/07/2013 02:10 AM, Christopher Paggen (cpaggen) wrote:
Howdy,
Running the most recent OVS and libvirt I'm running into the following error message with virt-install:
root@qemu-kvm:~/libvirt-1.0.5# <mailto:root@qemu-kvm:%7E/libvirt-1.0.5#> ovs-vsctl -V
ovs-vsctl (Open vSwitch) 1.11.90
Compiled May 6 2013 22:37:22
root@qemu-kvm:~/libvirt-1.0.5# <mailto:root@qemu-kvm:%7E/libvirt-1.0.5#>
root@qemu-kvm:~/libvirt-1.0.5# <mailto:root@qemu-kvm:%7E/libvirt-1.0.5#> virt-install --connect qemu:///system --name DSL2 --ram 1024 --vcpus 1 --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none --network=bridge:br0 --vnc --os-type=linux --cdrom /dev/sr0
Starting install...
ERROR Unable to add bridge br0 port vnet0: Operation not supported
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start DSL2
otherwise, please restart your installation.
root@qemu-kvm:~/libvirt-1.0.5# <mailto:root@qemu-kvm:%7E/libvirt-1.0.5#> ovs-vsctl del-port br0 vnet0
root@qemu-kvm:~/libvirt-1.0.5# <mailto:root@qemu-kvm:%7E/libvirt-1.0.5#> libvirtd --version
libvirtd (libvirt) 1.0.5
root@qemu-kvm:~/libvirt-1.0.5# <mailto:root@qemu-kvm:%7E/libvirt-1.0.5#> virsh --version
1.0.5
root@qemu-kvm:~/libvirt-1.0.5# <mailto:root@qemu-kvm:%7E/libvirt-1.0.5#> virt-install --connect qemu:///system --name DSL2 --ram 1024 --vcpus 1 --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none --network=bridge:br0 --vnc --os-type=linux --cdrom /dev/sr0
There is nothing in this command line to say that the bridge is an openvswitch bridge, so libvirt is attempting to treat it as the default Linux host bridge type. As a matter of fact, as far as I know virt-install hasn't been enhanced to support direct description of an openvswitch bridge on its commandline. The best way to solve this problem is to create a libvirt network to encapsulate the openvswitch bridge, then tell virt-install to use that network. 1) Put the following xml into a file (e.g. /tmp/ovsnet.xml): <network> <name>ovs-br0</name> <forward mode='bridge'/> <bridge name='br0'/> <virtualport type='openvswitch'/> </network> 2) define and start the network: # virsh net-define /tmp/ovsnet.xml # virsh net-start ovs-br0 # virsh net-autostart ovs-br0 3) run virt-install telling it to use the network "ovs-net": # virt-install --connect qemu:///system --name DSL2 --ram 1024 --vcpus 1 \ --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none \ --network=ovs-br0 \ <======= THIS LINE IS CHANGED. --vnc --os-type=linux --cdrom /dev/sr0

Thanks Laine, I now have it working. After applying the changes you recommended, I had to change apparmor settings as libvirt was in enforce mode: root@qemu-kvm:~/openvswitch# aa-complain /etc/apparmor.d/* Setting /etc/apparmor.d/sbin.dhclient to complain mode. Setting /etc/apparmor.d/usr.bin.evince to complain mode. Setting /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper to complain mode. Setting /etc/apparmor.d/usr.lib.telepathy to complain mode. Setting /etc/apparmor.d/usr.sbin.cupsd to complain mode. Setting /etc/apparmor.d/usr.sbin.libvirtd to complain mode. Setting /etc/apparmor.d/usr.sbin.rsyslogd to complain mode. Setting /etc/apparmor.d/usr.sbin.tcpdump to complain mode. root@qemu-kvm:~/openvswitch# virsh start DSL1 Domain DSL1 started root@qemu-kvm:~/openvswitch# ovs-vsctl show 8f5670fc-da00-4b7d-9865-63f2abe6267a Bridge "br0" Port "vnet0" Interface "vnet0" Port "eth1" Interface "eth1" Port "br0" Interface "br0" type: internal root@qemu-kvm:~/openvswitch# root@qemu-kvm:~/openvswitch# virsh net-dumpxml ovs-br0 <network> <name>ovs-br0</name> <uuid>9165a827-15f7-de75-2909-26f909559850</uuid> <forward mode='bridge'/> <bridge name='br0' /> <virtualport type='openvswitch'/> </network> root@qemu-kvm:~/openvswitch# From: sendmail [mailto:justsendmailnothingelse@gmail.com] On Behalf Of Laine Stump Sent: Wednesday, May 08, 2013 4:55 PM To: libvirt-users@redhat.com Cc: Christopher Paggen (cpaggen) Subject: Re: [libvirt-users] Libvirt 1.0.5 with Openvswitch 1.11.90: unable to add bridge br0 port vnet0 operation not supported On 05/07/2013 02:10 AM, Christopher Paggen (cpaggen) wrote: Howdy, Running the most recent OVS and libvirt I'm running into the following error message with virt-install: root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:%7E/libvirt-1.0.5> ovs-vsctl -V ovs-vsctl (Open vSwitch) 1.11.90 Compiled May 6 2013 22:37:22 root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:%7E/libvirt-1.0.5> root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:%7E/libvirt-1.0.5> virt-install --connect qemu:///system --name DSL2 --ram 1024 --vcpus 1 --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none --network=bridge:br0 --vnc --os-type=linux --cdrom /dev/sr0 Starting install... ERROR Unable to add bridge br0 port vnet0: Operation not supported Domain installation does not appear to have been successful. If it was, you can restart your domain by running: virsh --connect qemu:///system start DSL2 otherwise, please restart your installation. root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:%7E/libvirt-1.0.5> ovs-vsctl del-port br0 vnet0 root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:%7E/libvirt-1.0.5> libvirtd --version libvirtd (libvirt) 1.0.5 root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:%7E/libvirt-1.0.5> virsh --version 1.0.5 root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:%7E/libvirt-1.0.5> virt-install --connect qemu:///system --name DSL2 --ram 1024 --vcpus 1 --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none --network=bridge:br0 --vnc --os-type=linux --cdrom /dev/sr0 There is nothing in this command line to say that the bridge is an openvswitch bridge, so libvirt is attempting to treat it as the default Linux host bridge type. As a matter of fact, as far as I know virt-install hasn't been enhanced to support direct description of an openvswitch bridge on its commandline. The best way to solve this problem is to create a libvirt network to encapsulate the openvswitch bridge, then tell virt-install to use that network. 1) Put the following xml into a file (e.g. /tmp/ovsnet.xml): <network> <name>ovs-br0</name> <forward mode='bridge'/> <bridge name='br0'/> <virtualport type='openvswitch'/> </network> 2) define and start the network: # virsh net-define /tmp/ovsnet.xml # virsh net-start ovs-br0 # virsh net-autostart ovs-br0 3) run virt-install telling it to use the network "ovs-net": # virt-install --connect qemu:///system --name DSL2 --ram 1024 --vcpus 1 \ --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none \ --network=ovs-br0 \ <======= THIS LINE IS CHANGED. --vnc --os-type=linux --cdrom /dev/sr0
participants (2)
-
Christopher Paggen (cpaggen)
-
Laine Stump