Set additional options to cloud-init generated interface configuration files.

rubentsirunyan

New Member
Dec 15, 2018
1
0
1
30
Hi.
On a Centos 7 based cloud-init image I am setting IP address and Gateway of the interface using GUI and it generates network interface configuration file like this:
Code:
# /etc/sysconfig/network-scripts/ifcfg-eth0
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=none
DEVICE=eth0
HWADDR=FE:FE:FE:FE:FE:FE
IPADDR=10.82.0.12
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no

I would like to add some more options like
Code:
MTU=1400
but cloud-init keeps overwriting the file after reboot. I know that there is no way to specify this setting using cloud-init's interface (both GUI and CLI). Is there some alternative way of specifying this setting that won't be overwritten by cloud-init?
 

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!