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


_______________________________________________
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Reply via email to