Created attachment 807734 [details] Screen shot Description of problem: Hi, I am trying to add virtual machine's interface to openvswitch created bridge. Following is output of virsh [root@O6MXHE4 tmp]# virsh dumpxml Data-VM2 .... <interface type='bridge'> <mac address='52:54:00:76:b7:64'/> <source bridge='Test1'/> <virtualport type='openvswitch'> <parameters interfaceid='cffede7f-f99e-4bc0-8438-34a64ab36e58'/> </virtualport> <target dev='macvtap0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> ...... When i started domain, it threw me following error. [root@O6MXHE4 tmp]# virsh start Data-VM2 --console error: Failed to start domain Data-VM2 error: Unable to add port macvtap0 to OVS bridge Test1: Operation not permitted Following is stack trace when VM is started at virt-manager. Error starting domain: Unable to add port macvtap0 to OVS bridge Test1: Operation not permitted Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 44, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in tmpcb callback(*args, **kwargs) File "/usr/share/virt-manager/virtManager/domain.py", line 1063, in startup self._backend.create() File "/usr/lib64/python2.6/site-packages/libvirt.py", line 678, in create if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: Unable to add port macvtap0 to OVS bridge Test1: Operation not permitted Version-Release number of selected component (if applicable): [root@O6MXHE4 tmp]# cat /etc/lsb-release LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch [root@O6MXHE4 tmp]# ovs-vsctl -V ovs-vsctl (Open vSwitch) 1.9.0 Compiled Aug 19 2013 23:40:33 [root@O6MXHE4 tmp]# [root@O6MXHE4 tmp]# libvirtd --version libvirtd (libvirt) 0.10.2 [root@O6MXHE4 tmp]# How reproducible: 1) Bring up said version of openvswitch 2) Configure bridge [root@O6MXHE4 tmp]# ovs-vsctl show cffede7f-f99e-4bc0-8438-34a64ab36e58 Bridge "Test1" Port "Test1" Interface "Test1" type: internal 3) Create VM using virt manager 4) associate OVS created bridge "Test1" as shown in attached screen shot. Steps to Reproduce: 1. Please follow above steps Actual results: Error thrown Expected results: vnet/macvtap intefaces should be added to OVS bridge Additional info: NA
This issue is consistent reproducible. [root@O6MXHE4 tmp]# uname -a Linux O6MXHE4 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux [root@O6MXHE4 tmp]# Thanks -Haresh
Hi, Can anybody help me with work around? I am not able to use OVS with lib virt due to this issue. Thanks -Haresh
You can run the following command to see the results: "ovsctl add-port Test1 macvtap0", Check whether the same error will occur.
It is nonsensical to tell libvirt to use a macvtap device to connect to a bridge device (whether it is a standard Linux bridge or an OVS bridge). Simply remove the <target dev='macvtap0'/> from your config and let libvirt create a tap device itself and you won't have any problem. <interface type='bridge'> <mac address='52:54:00:76:b7:64'/> <source bridge='Test1'/> <virtualport type='openvswitch'> <parameters interfaceid='cffede7f-f99e-4bc0-8438-34a64ab36e58'/> </virtualport> <target dev='macvtap0'/> ^^^^^^^^^^^^ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface>