Package: libvirt-daemon-driver-lxc
Version: 11.2.0-2
Severity: normal

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)

-- System Information:
Debian Release: trixie/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.22-amd64 (SMP w/32 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libvirt-daemon-driver-lxc depends on:
ii  libblkid1                      2.41-4
ii  libc6                          2.41-7
ii  libcap-ng0                     0.8.5-4+b1
ii  libfuse3-4                     3.17.1+git250416-1
ii  libgcc-s1                      14.2.0-19
ii  libglib2.0-0t64                2.84.1-1
ii  libtirpc3t64                   1.3.6+ds-1
ii  libvirt-common                 11.2.0-2
ii  libvirt-daemon                 11.2.0-2
ii  libvirt-daemon-driver-network  11.2.0-2
ii  libvirt0                       11.2.0-2
ii  logrotate                      3.22.0-1
ii  systemd-container              257.5-2

libvirt-daemon-driver-lxc recommends no packages.

libvirt-daemon-driver-lxc suggests no packages.

-- Configuration Files:
/etc/libvirt/lxc.conf changed:
log_with_libvirtd = 1


-- no debconf information

Reply via email to