I am trying to use libvirt + dsnmasq + openvswitch to create a bridged network with dhcp enabled. I created a libvirt network with the following XML:

<network connections='1'>
  <forward mode='bridge'/>
  <bridge name='ovsbr0'/>
    <tag id='1298'/>
  <virtualport type='openvswitch'/>

I can create guests using this network, e.g.:

    <interface type='network'>
        <mac address='52:54:00:a6:3b:48'/>
        <source network='ovs-net'/>
        <model type='virtio'/>
        <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>

I can manually configure an IP address on the guest and send inbound/outbound traffic. When I edit the ovs-net xml to include an IP address and DHCP configuration it fails as follows:

virsh net-edit --network ovs-net 

<network connections='1'>
<ip address='' netmask=''>
      <range start='' end=''/>
      <host mac='52:54:00:7a:6d:e7' name='test.com' ip=''/>

error: unsupported configuration: Unsupported <ip> element in network ovs-net with forward mode='bridge'

My networking knowledge is limited, so I am not sure if what I am trying to do is possible.


The schema essentially supports two classes of setup. The managed setup is based on a traditional bridge device that libvirt creates itself, and runs dnsmasq for DNS/DHCP service. The unmanaged setup is based on a traditional bridge, or openvswitch or macvtap or several other options. In the latter case, libvirt doesn't actually create anything itself - it is just a way to associate libvirt with the externally created network infra. As such libvirt won't run dnsmasq for these either, hence why it is rejecting your request to setup IP addrs / dhcp ranges.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.