[libvirt-users] problem with libvirt and ovs bridge

Hello, I have created an ovs bridge on which i have attached a port. I would like to connect my vm to that port,so i have created an xml defining the network. The xml is: <network> <name>ovs-snort</name> <forward mode='bridge'/> <bridge name='snort'/> <virtualport type='openvswitch'/> </network> but when i do virsh net-define /tmp/ovsnetwork.xml i get the error error: XML error: unexpected virtualport type -1 My libvirt version is 1.2.9 Can you guide me through that?

On Tue, Oct 28, 2014 at 05:32:58PM +0100, Anna Giannakou wrote:
Hello, I have created an ovs bridge on which i have attached a port. I would like to connect my vm to that port,so i have created an xml defining the network. The xml is: <network> <name>ovs-snort</name> <forward mode='bridge'/> <bridge name='snort'/> <virtualport type='openvswitch'/> </network> but when i do virsh net-define /tmp/ovsnetwork.xml i get the error error: XML error: unexpected virtualport type -1 My libvirt version is 1.2.9 Can you guide me through that?
Hmm, I haven't tested this lately, but here's some old notes on Libvirt and Open vSwitch: http://kashyapc.com/2013/07/13/configuring-libvirt-guests-with-an-open-vswit... And a related thread from libvirt users list: https://www.redhat.com/archives/libvirt-users/2013-April/msg00044.html -- /kashyap

On 10/28/2014 12:32 PM, Anna Giannakou wrote:
Hello, I have created an ovs bridge on which i have attached a port. I would like to connect my vm to that port,so i have created an xml defining the network. The xml is: <network> <name>ovs-snort</name> <forward mode='bridge'/> <bridge name='snort'/> <virtualport type='openvswitch'/> </network> but when i do virsh net-define /tmp/ovsnetwork.xml i get the error error: XML error: unexpected virtualport type -1 My libvirt version is 1.2.9
I tried virsh net-define of the exact same XML and the network was defined successfully. How was your libvirt package built, and for what host platform? It sounds like something went wrong with the build process. (BTW, if you follow kashyap's advice about setting a log destination and search for "unexpected virtualport type" it would tell us which function/line number is reporting the error, which might help to diagnose the problem)
participants (3)
-
Anna Giannakou
-
Kashyap Chamarthy
-
Laine Stump