[libvirt-users] How can I set the advertised value of MTU for virbr0 interface?

George Trakatelis trakatelis at gmail.com
Thu Oct 22 23:27:49 UTC 2015


Michal, 

Thank you for your response. Please accept my clarifications below.

> On 15.10.2015 20:23, George Trakatelis wrote:
> > Hi all,
> >
> > I want to set the advertised value of MTU for virbr0 interface on a
> > Fedora 21 host to 1454 to accommodate the installation of new VMs for
> > testing purposes.
> > The aforementioned host is an OpenStack VM actually, which explains
> > the need for a lower than 1500 MTU.
> >
> > I noticed Pieter Hollants' patch to set dhcp-option=<number>,"<value>"
> > for an interface, but it seems that it has not been implemented yet.

I should have written (for the patch) "that it has not been applied yet". 

Digging further, I realized that it has been applied but pulled before 1.0.3

for a number of reasons as explained by Laine Stump  
http://www.redhat.com/archives/libvir-list/2013-March/msg00166.html

> The patch is in:
> 
> Author:     Pieter Hollants <pieter at hollants.com>
> AuthorDate: Thu Feb 21 23:40:17 2013 +0100
> Commit:     Laine Stump <laine at laine.org>
> CommitDate: Fri Feb 22 19:45:19 2013 -0500
> 
>     Add support for <option> tag in network config
> 
>     This patch adds support for a new <option>-Tag in the <dhcp> block of
>     network configs, based on a subset of the fifth proposal by Laine
>     Stump in the mailing list discussion at
>
https://www.redhat.com/archives/libvir-list/2012-November/msg01054.html.
> 
>     [...]
> 
> But I don't think it will solve your problem. IIUC you want to modify
> MTU of virbr0, not just advertise altered MTU to domains.

Well, in my case (which I briefly described earlier), 
having dhcp-option=26,1454 or dhcp-option-force=26,1454 
in /var/lib/libvirt/dnsmasq/default.conf does the trick. 

> Does this virbr0 come from the default libvirt network?
> If so, I am afraid there's no way how to specify MTU. 
> What you could do, is to define <interface/> [1] 
> and then bridged <network/> [2] that will use the interface.
> Libvirt already has support for setting MTUs for host interfaces. 
> 
> Michal

I'll try that! For the time being, I applied a mini version of the patch. 

George 




More information about the libvirt-users mailing list