[libvirt] Resolve listen IP for graphics attached to Open vSwitch network

Petr Horacek phoracek at redhat.com
Mon Nov 21 14:24:16 UTC 2016


Hello,

libvirt allows us to attach graphics device to a network, then it
resolves IP on its own.

However, when OVS network is used and not attached to a fake-bridge,
but rather to OVS bridge and given VLAN tag, libvirt is not able to
resolve IP (it tries to use IP of bridge, whereas it should check
another port).

Network definition:
<network>
  <name>net1</name>
  <forward mode='bridge'/>
  <bridge name='ovsbr0'/>
  <virtualport type='openvswitch'/>
  <vlan>
    <tag id='20'/>
  </vlan>
</network>

Graphics definition:
<graphics type='spice'>
  <listen type='network' network='net1'/>
</graphics>

Network setup:
ovs-vsctl add-br ovsbr0
ovs-vsctl add-port ovsbr0 net1 tag=20 -- set Interface net1 type=internal
ip address add 192.168.10.1/24 dev net1

We need graphics to listen on IP 192.168.10.1. In order to do that,
libvirt should use first IP found on given bridge's (ovsbr0) ports
with given vlan tag (20). When no vlan tag is given, it should also
check the bridge itself (as it does now).

It should also work with portgroups (as interface does).

Note:
Interface attached to this type of networks works OK.

Do you think it would be possible to implement/fix this scenario?

Thanks a lot,
Petr




More information about the libvir-list mailing list