Page 1 of 1
Vboxmanage network limit not working
Posted: 24. Nov 2015, 19:42
by subs
Hi all
I have two ubuntu VMS on an internal network on the same host.
Now I'm using iperf to test bandwidth between them and get a steady 240 Mbits/s.
I wanted to see if I could slow this down so used vbixmanage and bandwidthctl to create a group called
Limit: Ubuntu1
Limit2: Ubuntu2
With a limit of 100k. I then applied this group to port groups 1 and 2 using the modifyvm command following the example
As set in the manual.
Iperf reports no drop in speed, tried with both bridged and internal. Any ideas?
Re: Vboxmanage network limit not working
Posted: 24. Nov 2015, 20:39
by mpack
This is by design. VirtualBox never throttles the performance of a virtual network card. It does not attempt to emulate a realistic throughput: that simply is not the purpose of the feature. Throughput will be limited by physical devices the data passes through.
Re: Vboxmanage network limit not working
Posted: 24. Nov 2015, 21:57
by Martin
mpack, I think you missed a
feature of Vbox which is available since version 4.2

Re: Vboxmanage network limit not working
Posted: 24. Nov 2015, 21:58
by subs
Thanks for the reply.
Maybe I'm not understanding correctly, what is the purpose of the limit feature then?
Chapter 6 of the virtual box manual, and yes after 4.2.
Re: Vboxmanage network limit not working
Posted: 25. Nov 2015, 00:48
by socratis
subs, could you post the exact commands that you used and not just a description of what you did? Maybe a parameter is wrong, or something similar...
Re: Vboxmanage network limit not working
Posted: 25. Nov 2015, 01:02
by subs
Hi,
Commands below, all enter fine without errors. Both virtual machines powered down when running. Both on internal network called test.
Static IP addresses set for both.
VBoxManage bandwidthctl "Ubuntu" add Limit --type network --limit 100k
VBoxManage modifyvm "Ubuntu" --nicbandwidthgroup1 Limit
VBoxManage modifyvm "Ubuntu" --nicbandwidthgroup2 Limit
VBoxManage bandwidthctl "Ubuntu Clone" add Limit2 --type network --limit 500k
VBoxManage modifyvm "Ubuntu Clone" --nicbandwidthgroup1 Limit2
VBoxManage modifyvm "Ubuntu Clone" --nicbandwidthgroup2 Limit2
Now I'm not sure how the 'nicbandwidthgroup1/2' apply, do these map to the specific adapters?
In any case each VM is only using 1 adapter.
Re: Vboxmanage network limit not working
Posted: 25. Nov 2015, 01:31
by socratis
Now I'm not sure how the 'nicbandwidthgroup1/2' apply, do these map to the specific adapters?
Exactly. So, you never needed the commands:
Code: Select all
VBoxManage modifyvm "Ubuntu" --nicbandwidthgroup2 Limit
VBoxManage modifyvm "Ubuntu Clone" --nicbandwidthgroup2 Limit2
Not that it hurts now, but if you put in a 2nd NIC, it will.
subs wrote:Now I'm using iperf to test bandwidth between them and get a steady 240 Mbits/s.
So, why did you create a limit of a combined 600 kb/s? Also, from the manual, this commamd only affects the transit speeds and not the receive ones. I'm not quite sure what you're trying to do, but the commands seem fine, except the extra two that I pointed out at the beginning...
Re: Vboxmanage network limit not working
Posted: 25. Nov 2015, 11:16
by mpack
Martin wrote:mpack, I think you missed a
feature of Vbox which is available since version 4.2

Hmm. Yes, I did forget about that. I wouldn't normally think of applying that to a purely virtual network, since the purpose is presumably to avoid hogging a shared physical network.
My point remains: I detected an implicit assumption on the part of the OP that if VBox emulates an n Mb NIC, then VirtualBox always throttles the throughput to n Mb, and of course it doesn't, as a rule.