Incus cluster container network interface mtu not applied from profile

Hello,
I would like to apply a specific MTU value to containers.
Here is the default profile:

incus profile show default
config: {}
description: Default Incus profile
devices:
  eth0:
    mtu: "1340"
    name: eth0
    nictype: bridged
    parent: br-int
    type: nic
name: default
used_by:
- /1.0/instances/c0
- /1.0/instances/c1
project: default

Here is the current container interface status:

incus exec c0 -- ip addr ls dev eth0 | grep mtu
15: eth0@if16: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

I tried restarting incus and containers unsuccessfully.
It seems the mtu profile value is not considered…
Any hint?

incus config show --expanded c0?

incus config show --expanded c0
architecture: x86_64
config:
  image.architecture: amd64
  image.description: Debian trixie amd64 (20240613_05:24)
  image.os: Debian
  image.release: trixie
  image.serial: "20240613_05:24"
  image.type: squashfs
  image.variant: default
  volatile.base_image: 348c7697c7e8f5a435ccd7df014a0070bc0381fa75d64bfe9d15a0a9cd8ec290
  volatile.cloud-init.instance-id: 70eb7468-1096-4312-9b3d-879fea75544f
  volatile.eth0.host_name: veth8b52228d
  volatile.eth0.hwaddr: 00:16:3e:bb:16:cb
  volatile.eth0.last_state.ip_addresses: 10.26.172.2,fd42:6870:59be:b8db:216:3eff:febb:16cb
  volatile.idmap.base: "0"
  volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.last_state.idmap: '[]'
  volatile.last_state.power: RUNNING
  volatile.last_state.ready: "false"
  volatile.uuid: b741253d-f4e0-47f0-b68d-4b33ed6f80b4
  volatile.uuid.generation: b741253d-f4e0-47f0-b68d-4b33ed6f80b4
devices:
  eth0:
    name: eth0
    network: ovn-net
    type: nic
  root:
    path: /
    pool: default
    type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""

Right, so your container has its own eth0 device set in the configuration, overriding the one from the profile. That eth0 doesn’t have an mtu property set, so it’s using the default value of 1500.

Hello,
When I try to edit the configuration instead of profile, I get the following message:

Erreur lors de la lecture de la configuration : Invalid devices: Device validation failed for "eth0": Cannot use "mtu" property in conjunction with "network" property
Press enter to open the editor again or ctrl+c to abort change

I have the same request with the ability to change the vlan tag either via profile or configuration.

A bit of explanation:
I have finally found a way to solve my MTU problem. PMTU doesn’t work with an IPSec + VXLAN tunnel. I added a POSTROUTING rule for traffic flowing out of this tunnel with defined MTU values for IPv4 and IPv6. There is no more need to change the MTU value at the container interface level anymore.