one icon indicating copy to clipboard operation
one copied to clipboard

MTU attribute does not change the host bridged interface MTU in OpenNebula

Open MortezaBashsiz opened this issue 4 years ago • 8 comments

Description Hi In OpenNebula, I have a Virtual Network with "Bridge" mode which the address pool is with "Ethernet" type (Because there is a DHCP server to assign the IP to VM), The network driver is "virtio" . I want to use this network with CEPH to use Block and CephFS storage, So for better performance I need to have the MTU=9000 in my network. I have set both GUEST_MTU and MTU to 9000 in Virtual Network attributes, But when i create the VM, the created bridge interface in Host has MTU=1500 and i think the attribute does not work, or i miss something else in the configuration. However i can set the MTU in VM with DHCP server, But does not work for Host.

To Reproduce Create Network with "bridge mode" Set the Address type to "Ethernet" Set the GUEST_MTU & MTU to 9000 Create a VM with an interface in this Network

Expected behavior When i watch the MTU of created bridge network in host, it should be 9000 but it is not.

Details

  • Hypervisor: KVM
  • Version: 5.12.01

Progress Status

  • [ ] Branch created
  • [ ] Code committed to development branch
  • [ ] Testing - QA
  • [ ] Documentation
  • [ ] Release notes - resolved issues, compatibility, known issues
  • [ ] Code committed to upstream release/hotfix branches
  • [ ] Documentation committed to upstream release/hotfix branches

MortezaBashsiz avatar Aug 15 '20 05:08 MortezaBashsiz

You can set the bridge MTU in /var/lib/one/remote/etc/vnm/OpenNebulaNetwork.conf (or any other ip link attribute):

...
 :ip_bridge_conf:                                                               
     :mtu: 9000
...

More details: http://docs.opennebula.io/5.12/deployment/open_cloud_networking_setup/bridged.html#opennebula-configuration

Important do not forget to sync remotes in order to propagate the change to the hosts (onehost sync -f)

Closing this, will reopen if needed

rsmontero avatar Aug 15 '20 19:08 rsmontero

Thank you for your answer @rsmontero I did this and the mtu on host for bridge network is 1500

For the steps

  1. I have changed the file in all my master nodes
  2. Restarted opennebula.service on all master hosts
  3. Run command (onehost sync -f)
  4. Create a new VM
  5. run command (ip link show)

And the mtu for new bridge interfaces is 1500 and not changed

MortezaBashsiz avatar Aug 16 '20 03:08 MortezaBashsiz

Hi again Is there any solution to afford this issue? I had a lot of search and test but there is nothing in internet and documents to describe this. It is really critical for me. Thanks

MortezaBashsiz avatar Aug 16 '20 20:08 MortezaBashsiz

Could you check that the bridge is recreated? As long as there are VMs the bridge is reused and OpenNebula can be configured to keep it in any case.

rsmontero avatar Aug 17 '20 08:08 rsmontero

Yes The bridge recreated, Even when i create a new VM with new bridge interface (which was not exists before), the MTU of created bridge in one host is 1500.

When i delete a VM the relaited bridge is deleted in one host (like one-105-1). And after creating a new VM, the new bridges created with new names (like one-106-1), and the MTU is again 1500.

MortezaBashsiz avatar Aug 17 '20 09:08 MortezaBashsiz

Any update? Could you please HELP me to debug why the mtu is not changed?

MortezaBashsiz avatar Aug 19 '20 12:08 MortezaBashsiz

It seems there are 2 missing parts

  1. Setting the MTU on the VM interface on the hypervisor by the libvirt (interface like one-105-1) -- currently not possible
  2. Setting the MTU on the bridge -- also not currently possible

xorel avatar Aug 20 '20 14:08 xorel

Hi @xorel Thank you for your response. Sorry for my poor English, Exactly i mean part number 1 that you mentioned. Is it really impossible to do this? For setting the MTU of (one-105-1) i write an API with Golang and put the api-call in Context-Script

Screenshot from 2020-08-21 15-56-40

Actually it works fine and i automated this operation, But i think it could be better if i do this operation with some directives in OpenNebula.

Thank you again for your Patience

MortezaBashsiz avatar Aug 21 '20 11:08 MortezaBashsiz