Traffic shaping for VM


Anyone know how to setting traffic shaping for VM, example eth0 NIC will have 100Mbps (12.5MB/s) ? I know I can do that by create tc - traffic control - rules for each VM but I thought it so manually.

Thank you so much,

This is not supported out-of-the-box. In the near future, we want to add a
custom hook that can be executed as part of the network drivers (e.g.
pre.d, post.d clean.d), to execute custom scripts upon VM network

Right now, you need to modify the pre/post/clean scripts by hand. You have
access there to VM template (where you may store the bandwith if it makes
sense in your case)


Hi Ruben,

Thank you for your help. Could you give me the absolute path of pre/post/clean script. I will try modify the scripts for add tc rules.


It depends on the network driver you are using


After changing any of those run onehost sync -f

1 Like

Hi Ruben,

Thank you so much for your hints :slight_smile: