Proxmox api defines mtu option for VM networking in documentation but does not accept the option.

jtracy

Member
Aug 30, 2018
43
4
13
50
So I am working with the proxmox api and experimenting with it and noticed an issue with specifying network configuration for VMs.

Reading the docs on the QEMU VM config API it shows that you can pass in a MTU option to the network.

[model=]<enum> [,bridge=<bridge>] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=<XX:XX:XX:XX:XX:XX>] [,mtu=<integer>] [,queues=<integer>] [,rate=<number>] [,tag<integer>] [,trunks=<vlanid[;vlanid...]>] [,<model>=<macaddr>]

But when i try and add a mtu to the networking config it gives the following error:

proxmoxer.core.ResourceException: 400 Bad Request: Parameter verification failed. - b'{"errors":{"net1":"invalid format - format error\\nnet1.mtu: property is not defined in schema and the schema does not allow additional properties\\n"},"data":null}'

Has anyone seen this issue:

Also does anyone know what the differences between tag and trunks are? I can't find anything specific on those.

# pveversion
pve-manager/6.1-8/806edfe1 (running kernel: 5.3.18-3-pve)
 
Hi,
the feature is pretty recent, so you'll have to update to qemu-server >=6.2-3.

Regarding your other question, I'm by no means an expert on the topic, but I'll try my best: VLAN tags are used to divide a network into different logical parts. Only those with the same VLAN ID will see each other. Trunking is putting together multiple normally parallel one-to-one connections into a single one. In the context of VLANs this means using the same connection to transport traffic from multiple VLANs. For the trunks parameter you can specify the different VLAN ID ranges, you want the NIC to accept, e.g. trunks=1;4-7.
 
Thanks for the info. I wish there was an an easier way in the api documentation to see when features were added.
 
You could use the api-viewer that's installed on your PVE host: file:///usr/share/pve-docs/api-viewer/index.html. Then you won't see any features you don't have yet.
 
Thanks. I didn't know that existed.

I want to see the latest options, but I wish there was an easier way to see when options were added to the api? I am working on some ansible modules for proxmox and it would be helpful to know versioning information.
 
Feel free to create an enhancement request on the bugtracker for this. Although I'd guess that this is rather low priority and maybe not easily possible retroactively.
 

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!