KVM seting MTU in 802.1Q VN_MAD

Our datacenter is requesting a particular MTU.

Adding it as a custom attribute to the Address Range in the virtual network (just like the NETMASK) does not work. Adding it to as MTU of the interface in 802.1Q Virtual Network does not work either.

In both cases, the MTU is set in the VLAN on the HOST, but it is not transferred to the context as ETH0_MTU.

Other custom attributes such as NETMASK do work for the same interface, and are passed via the context.

Versions of the related components and OS (frontend, hypervisors, VMs):


Steps to reproduce:

Modify a Virtual Network, in the address range add a custom attribute MTU set to 1400.

Current results:

The virtual network attribute in the host will get the MTU, but the MTU is not contextualized and configured in the guest.

Expected results:

I guess the MTU should work just like any other network custom attribute of the network.

Perhaps this behavior is configurable?

I can see that:


This rules that the Virtual Network attribute should be inherited by the VM NIC.

However I cannot see where is the decision to contextualize that attribute. The context packages are expecting an ETH0_MTU. This seems to be ruled by the option “Add Network Contextualization”.

The obvious workarround is to change the setting from a contex start script, although it will get complicated with multiple interfaces.