None of the solutions I found seem to work and since I've been at it for days, I decided to give up and ask for help.

I have created an open vswitch called ovs-bridge with nmcli. I created ports and interfaces, and plugged in eno1. Everything works, I created a port with vlan tagging and a new interface gets an ip address from my dhcp server in that vlan.

Next step is I need kvm guests to plug into a vswitch port, with or without vlan tagging. For the life of me I cannot get this to work.

ovs-vsctl show:

    Bridge ovs-bridge
        Port ovs-p99
            Interface eno1
                type: system
        Port ovs-p1
            tag: 50
            Interface ovs-int-p1
                type: internal
        Port ovs-p0
            Interface ovs-int-p0
                type: internal

nmcli con show:

NAME           UUID                                  TYPE           DEVICE
ovs-int-p0     c6d2243f-8a96-4647-887a-d2cdfb8ae878  ovs-interface  ovs-int-p0
virbr0         ad67349b-3e2b-45ed-b66d-b148c7d01d4d  bridge         virbr0
ovs-bridge     dbb6960e-ac13-4452-b4c2-44782bbc54ac  ovs-bridge     ovs-bridge
ovs-int-p1     1af100a3-b08d-41bd-ab1f-a5c3059807f3  ovs-interface  ovs-int-p1
ovs-int-p99    3d64f617-4c9b-47a0-b48c-44380ea7d2bb  ethernet       eno1
ovs-p0         6e3a5415-8756-4069-a788-d661da078d46  ovs-port       ovs-p0
ovs-p1-vlan50  62f4cfe7-0317-4ca8-96f9-d37ac771b308  ovs-port       ovs-p1
ovs-p99        0a9c184c-0246-4cb1-a5bf-7c7b186b40e5  ovs-port       ovs-p99
wired-dhcp     760eda5d-f092-3ee0-998d-d923ff8bf5ca  ethernet       --

nmcli dev show:

DEVICE      TYPE           STATE                   CONNECTION
virbr0      bridge         connected (externally)  virbr0
ovs-int-p0  ovs-interface  connected               ovs-int-p0
eno1        ethernet       connected               ovs-int-p99
ovs-bridge  ovs-bridge     connected               ovs-bridge
ovs-int-p1  ovs-interface  connected               ovs-int-p1
ovs-p0      ovs-port       connected               ovs-p0
ovs-p1      ovs-port       connected               ovs-p1-vlan50
ovs-p99     ovs-port       connected               ovs-p99
lo          loopback       unmanaged               --
virbr0-nic  tun            unmanaged               --

I defined a network for libvirt to use:

  <forward mode='bridge'/>
  <bridge name='ovs-bridge'/>
  <virtualport type='openvswitch'/>
  <portgroup name='untagged' default='yes'>
  <portgroup name='vlan50'>
      <tag id='50'/>
  <portgroup name='vlan60'>
      <tag id='60'/>
  <portgroup name='vlan-all'>
    <vlan trunk='yes'>
      <tag id='2'/>
      <tag id='3'/>

The network is visible when I edit the guest in virt-manager. I defined the guest network as follows:

<interface type="network">
  <mac address="52:54:00:a6:dc:48"/>
  <source network="ovs-network" portgroup="untagged"/>
  <model type="virtio"/>
  <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>

When I start the guest it comes back with the following: virsh start fed32srv:

error: Failed to start domain fed32srv
error: Cannot get interface MTU on 'ovs-bridge': No such device

So I found a lot of information already:

There are a million guides, most of which don't even work so I think a lot of that is outdated.

Anyway I tried setting MTU size on interfaces and the internal interface but that didn't help. I restarted everything, even rebooted.

So back to the question, how can I setup kvm guests to plug into a vswitch port, with or without vlan tagging (on the ovs port)?

Ask if you need more information.

Thanks for the help!

2 Answers 2


Your bridge is missing management port and interface:

    Bridge ovs-bridge
        Port ovs-bridge
            Interface ovs-bridge
                type: system

When you create ovs bridge with ovs-vsctl both are there by default. When you create it with NM, it is not... You need to create them explicitly:

sudo nmcli con add type ovs-port conn.interface ovs-bridge master ovs-bridge con-name ovs-px
sudo nmcli con add type ovs-interface slave-type ovs-port conn.interface ovs-bridge master ovs-px con-name ovs-int-px

So, the problem is reproducable when setting things up with nmcli. When setting up the bridge and interface with ovs-vsctl commands, things work as expected.

After the basic setup, follow this: https://blog.scottlowe.org/2012/11/12/libvirt-ovs-integration-revisited/

and everything worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .