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'>
<name>ovs-net</name>
<uuid>fffd6fea-a753-4fca-b684-76fb24866ba3</uuid>
<forward mode='bridge'/>
<bridge name='ovsbr0'/>
<vlan>
<tag id='1298'/>
</vlan>
<virtualport type='openvswitch'/>
</network>
I can create guests using this network, e.g.:
<domain>
...
<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'/>
</interface>
</domain>
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'>
<name>ovs-net</name>
...
<ip address='10.20.101.121' netmask='255.255.255.0'>
<dhcp>
<range start='10.20.101.121' end='10.20.101.130'/>
<host mac='52:54:00:7a:6d:e7' name='test.com' ip='10.20.101.120'/>
</dhcp>
</ip>
</network>
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.