csmart / ansible-role-virt-infra

Define and manage guests and networks on a KVM host with Ansible
GNU General Public License v3.0
68 stars 48 forks source link

add MTU support on libvirt and guest networks #26

Closed csmart closed 4 years ago

csmart commented 4 years ago

This patch allows you to set the MTU for libvirt networks on KVM host as well as for guest interfaces.

Simply add the mtu option to your kvmhost network definitions and/or your guest network interfaces definitions. When setting on a libvirt host network and specifying an IP, that interface will get that MTU.

Also note that setting the MTU for an OVS host network is not supproted by libvirt and will be ignored. However, setting an MTU for a guest connected to an OVS network is supported.

Note that if you're connecting your guest to a bridge, the bridge on the KVM host should also have been set to the same or higher MTU.