[SOLVED] Set MTU via Cloud-init?

  • Like
Reactions: Razva
Hi,

it possible now with virtio nic, and a patch have been added to proxmox recenctly, avaible in vm config but not in gui for now

https://git.proxmox.com/?p=qemu-server.git;a=commit;h=61a14cde8d568e552d3deaab2da76b479b8aca7b

edit your vm config file in /etc/pve/qemuserver/<vmid>.conf

net0: ......,host_mtu=1400

for example.

special value: host_mtu=1, will force the mtu to vmbrX mtu.
Thank you very much for the hint!

I guess that we're talking about /etc/pve/qemu-server/100.conf and that the line should look like this: net0: virtio=D2:69:F9:B7:FA:6E,bridge=vmbr4000,host_mtu=1400?
 
Hi,

it possible now with virtio nic, and a patch have been added to proxmox recenctly, avaible in vm config but not in gui for now

https://git.proxmox.com/?p=qemu-server.git;a=commit;h=61a14cde8d568e552d3deaab2da76b479b8aca7b

edit your vm config file in /etc/pve/qemuserver/<vmid>.conf

net0: ......,host_mtu=1400

for example.

special value: host_mtu=1, will force the mtu to vmbrX mtu.
When adding the host_mtu=1400 part, the network device basically "disappears" from the Cloud-init Proxmox UI. Is this normal?
 
are you running last proxmox updates ?

#pveversion -v ?
Yes, I'm running everything on latest.

Bash:
# pveversion -v
proxmox-ve: 6.2-1 (running kernel: 5.4.44-2-pve)
pve-manager: 6.2-6 (running version: 6.2-6/ee1d7754)
pve-kernel-5.4: 6.2-4
pve-kernel-helper: 6.2-4
pve-kernel-5.4.44-2-pve: 5.4.44-2
pve-kernel-5.4.44-1-pve: 5.4.44-1
pve-kernel-5.4.34-1-pve: 5.4.34-2
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.4-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.16-pve1
libproxmox-acme-perl: 1.0.4
libpve-access-control: 6.1-1
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.1-3
libpve-guest-common-perl: 3.0-10
libpve-http-server-perl: 3.0-5
libpve-storage-perl: 6.1-8
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.2-1
lxcfs: 4.0.3-pve3
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.2-8
pve-cluster: 6.1-8
pve-container: 3.1-8
pve-docs: 6.2-4
pve-edk2-firmware: 2.20200531-1
pve-firewall: 4.1-2
pve-firmware: 3.1-1
pve-ha-manager: 3.0-9
pve-i18n: 2.1-3
pve-qemu-kvm: 5.0.0-4
pve-xtermjs: 4.3.0-1
qemu-server: 6.2-3
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.4-pve1

# apt-get update
Hit:1 http://security.debian.org buster/updates InRelease
Hit:2 http://download.proxmox.com/debian/pve buster InRelease
Hit:3 http://ftp.ro.debian.org/debian buster InRelease
Get:4 http://ftp.ro.debian.org/debian buster-updates InRelease [51.9 kB]
Fetched 51.9 kB in 1s (85.4 kB/s)  
Reading package lists... Done

# apt-get upgrade
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Do I need to apply any patches?
 
can you send your vm config file content ?
Sure, there you go:
Code:
boot: c
bootdisk: scsi0
cipassword: X
ciuser: X
cores: 2
ide2: local-lvm:vm-211-cloudinit,media=cdrom
ipconfig0: ip=49.12.X.X/27,gw=49.12.X.X
memory: 4096
name: server
net0: virtio=62:2D:F2:00:AD:46,bridge=vmbr4000,firewall=1
numa: 1
onboot: 1
scsi0: local-lvm:vm-211-disk-0,discard=on,size=80G,ssd=1
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=1578fecd-1a33-4c81-a362-a15bd43a6c7e
sockets: 1
sshkeys: X
vga: serial0
vmgenid: e6c87156-1940-4ce4-a7b1-2654e6924ce2

The entire network device will basically disappear from the UI and get unusable when making this change:
Code:
net0: virtio=62:2D:F2:00:AD:46,bridge=vmbr4000,firewall=1,host_mtu=1400

Any hints?
 
+1 any news about this patch?

It would be great to be able to set the mtu via GUI.

Thanks
 
Hello there!

Any news about this patch? Any help we the users can offer?

It would be really great to have this option.

Thanks
 
Especially when using SDN with VXLANs this is needed to be able to set MTU to 1450, would be very nice to have it included in GUI
 
  • Like
Reactions: Razva

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!