Vboxmanage network limit not working

Discussions related to using VirtualBox on Windows hosts.
Post Reply
subs
Posts: 3
Joined: 24. Nov 2015, 19:36

Vboxmanage network limit not working

Post 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?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Vboxmanage network limit not working

Post 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.
Martin
Volunteer
Posts: 2562
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Vboxmanage network limit not working

Post by Martin »

mpack, I think you missed a feature of Vbox which is available since version 4.2 ;)
subs
Posts: 3
Joined: 24. Nov 2015, 19:36

Re: Vboxmanage network limit not working

Post 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.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Vboxmanage network limit not working

Post 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...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
subs
Posts: 3
Joined: 24. Nov 2015, 19:36

Re: Vboxmanage network limit not working

Post 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.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Vboxmanage network limit not working

Post 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...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Vboxmanage network limit not working

Post 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.
Post Reply