[SOLVED] Automatically setting MTU for newly created containers

MatthiasMerkel

New Member
Feb 24, 2019
1
1
1
26
In our configuration we use a MTU of 1462 on our LXC containers because of tunneling. We currently do this by manually adding the mtu option to the config file of every newly created LXC container.

Is it possible to make Proxmox automatically add the MTU option to the network interface when a new LXC container is created?

EDIT:

Solved by adding the line
lxc.net.0.mtu = 1462
at the end of /usr/share/lxc/config/common.conf
 
Last edited:
  • Like
Reactions: Cheatha
I think the proposed solution will not work on a cluster environment, at least will not be efficient modify the file on all the PVEs...

Is there other alternative? May be something on the pmxcfs?
 
  • Like
Reactions: denis-itskovich