[libvirt-users] Unable to provision VM attaching it directly to a OVS bridge

Reposting from virt-tools mailing list: Hi! I'm facing a problem that could be triggered by some lacking of support from libvirt on Open vSwitch (or could be my mistake). I have interests in researching on virtual networks and SDN. To keep things simple, I've decided to use libvirt/virt-tools to manage VM's since my focus is on the network, instead of using a full feature system like OpenStack. I'm quite new with libvirt/virt-tools, but I have a good experience with openvswitch and other virtualizations technologies (which I dropped in libvirt/kvm favor). I'm using Fedora 19 packages openvswitch (1.11.0-1.fc19.x86_64) libvirt (1.0.5.6-3.fc19.x86_64) virt-install (0.10.0-4.fc19.noarch) I've created an OVS bridge (databr0) outside libvirt, and then defined it inside libvirt with: <network> <name>databr0</name> <forward mode='bridge'/> <bridge name='databr0'/> <virtualport type='openvswitch'/> </network> And then 'net-autostart' and 'net-start' it with virsh. Now I've got: # virsh net-list Name State Autostart Persistent ---------------------------------------------------------- databr0 active yes yes When I try to provision an VM, if I use the virt-install option "--network=bridge:databr0,model=virtio,mac=00:00:00:00:00:03" I got the following error: # virt-install --connect qemu:///system --virt-type kvm --name vm2 --ram 768 --disk path=/home/lucas/local/vm/images/vm2.img --vnc --cdrom /home/lucas/local/vm/fc19-x86_64.iso --network=bridge:databr0,model=virtio,mac=00:00:00:00:00:03 --os-type=linux --os-variant fedora19 Starting install... ERROR Unable to add bridge databr0 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 vm2 otherwise, please restart your installation. I just managed to create a VM when I use '--nonetworks' option and after I do a 'virtsh edit vm2' and add: <interface type='bridge'> <mac address='00:00:00:00:00:03'/> <source bridge='databr0'/> <virtualport type='openvswitch'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </interface> Well, I read elsewhere that openvswitch bridging isn't fully supported. Is it the case or I'm facing another kind of problem ? regards Att Lucas Brasilino MSc Student @ Federal University of Pernambuco (UFPE) twitter: @lucas_brasilino

Hi Getting deeper, the error is raised by 'virDomainCreateLinux()'. Here comes the snippet of the XML argument passed to this call: (Pdb) print xmlDesc <domain type='kvm'> <name>vm2</name> <uuid>3d713513-e8ee-994a-0eba-51128bd4b42e</uuid> [...] <interface type='bridge'> <source bridge='databr0'/> <mac address='00:00:00:00:00:03'/> <model type='virtio'/> </interface> [...] </domain> So libvirt network driver is surely trying to use 'databr0' as the common Linux bridge implementation, not an Open vSwitch bridge. I tried to add an <virtualport='openvswitch'/> element in the XML created by virt-install and use 'virsh create' to create it but seems that libvirt's network driver does not support Open vSwitch when creating VM's. Is there some planning to support it ? Thanks! regards Lucas Brasilino MSc Student @ Federal University of Pernambuco (UFPE) twitter: @lucas_brasilino 2013/10/28 Lucas Brasilino <lrbbs@cin.ufpe.br>:
Reposting from virt-tools mailing list:
Hi!
I'm facing a problem that could be triggered by some lacking of support from libvirt on Open vSwitch (or could be my mistake).
I have interests in researching on virtual networks and SDN. To keep things simple, I've decided to use libvirt/virt-tools to manage VM's since my focus is on the network, instead of using a full feature system like OpenStack.
I'm quite new with libvirt/virt-tools, but I have a good experience with openvswitch and other virtualizations technologies (which I dropped in libvirt/kvm favor).
I'm using Fedora 19 packages
openvswitch (1.11.0-1.fc19.x86_64) libvirt (1.0.5.6-3.fc19.x86_64) virt-install (0.10.0-4.fc19.noarch)
I've created an OVS bridge (databr0) outside libvirt, and then defined it inside libvirt with:
<network> <name>databr0</name> <forward mode='bridge'/> <bridge name='databr0'/> <virtualport type='openvswitch'/> </network>
And then 'net-autostart' and 'net-start' it with virsh. Now I've got: # virsh net-list Name State Autostart Persistent ---------------------------------------------------------- databr0 active yes yes
When I try to provision an VM, if I use the virt-install option "--network=bridge:databr0,model=virtio,mac=00:00:00:00:00:03" I got the following error:
# virt-install --connect qemu:///system --virt-type kvm --name vm2 --ram 768 --disk path=/home/lucas/local/vm/images/vm2.img --vnc --cdrom /home/lucas/local/vm/fc19-x86_64.iso --network=bridge:databr0,model=virtio,mac=00:00:00:00:00:03 --os-type=linux --os-variant fedora19
Starting install... ERROR Unable to add bridge databr0 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 vm2 otherwise, please restart your installation.
I just managed to create a VM when I use '--nonetworks' option and after I do a 'virtsh edit vm2' and add:
<interface type='bridge'> <mac address='00:00:00:00:00:03'/> <source bridge='databr0'/> <virtualport type='openvswitch'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </interface>
Well, I read elsewhere that openvswitch bridging isn't fully supported. Is it the case or I'm facing another kind of problem ?
regards
Att Lucas Brasilino MSc Student @ Federal University of Pernambuco (UFPE) twitter: @lucas_brasilino
participants (1)
-
Lucas Brasilino