Dear Maintainer,
When I start an LXC container using virsh -c lxc:///system start <name> where the domain XML file for that container contains something along the lines of:
<interface type='bridge'>
<mac address='52:54:00:03:87:f2'/>
<source bridge='ovs0'/>
<vlan trunk='yes'>
<tag id='2'/>
</vlan>
<virtualport type='openvswitch'>
<parameters interfaceid='c8304245-b238-4c61-a7c1-6a8bc905e251'/>
</virtualport>
<mtu size='9000'/>
</interface>
the container starts as expected, but the "vnet<n>" veth device(s) created as a result are always set to exactly 1500 MTU regardless of what is specified for MTU in the domain
XML. This only happens when using LXC containers with libvirt; qemu/KVM VMs started with libvirt set the MTU correctly. I am unsure whether this is a bug in libvirt or whether
the underlying systemd-container process is handling this incorrectly. While it is possible to alter the MTU of the veth device once started and make it work, that's not a
workable solution in the long term.
What I expect to happen is that either the MTU is set on the veth device as specified in the domain XML, or the XML does not allow MTU to be set, but I cannot see anything in the
libvirt documentation to suggest that setting MTU is not a valid option here.
https://libvirt.org/formatdomain.html#mtu-configuration does not seem to specify that <mtu size='...'/> is unacceptable for LXC containers, so I assume this was meant to work.
This is reproducible in the current 11.0.2-2 in trixie and also 11.0.2-3 in experimental. (I have downgraded back to 11.0.2-2 now)