[SOLVED] Automatically setting MTU for newly created containers

MatthiasMerkel

New Member
Feb 24, 2019
1
1
1
24
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

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!