Main: Bandwidth groups for disks (and later network)
This introduces two new interfaces. The first one named IBandwidthGroup
represents one I/O limit and can be assigned to several mediums which
share this limit (which works only for harddisk images with the disabled
host cache).
The second one IBandwdithControl manages the groups and can create new ones
and destroy them if not required anymore.
VBoxManage: commands to access the bandwidth groups
Syntax:
VBoxManage storageattach <uuid|vmname>
...
--bandwidthgroup <name>
--bandwidthgroup assigns the specified device to the given group.
VBoxManage bandwidthctl <uuid|vmname>
--name <name>
--add disk|network
--limit <megabytes per second>
--delete
The --name parameter gives the name of the bandwidth group.
--add creates a new group of the given type (only disk is implemented so far)
with the given name.
--limit sets the limit to the given amount of MB/s
Note that limit can be changed while the VM is running. The VM
will immediately pick up the new limit for the given group name.
--delete deletes the group with the given name if it isn't used anymore.
Trying to delete a still used group will result in an error.
Example:
VBoxManage bandwidthctl "Test VM" --name Limit --add disk --limit 20
Creates a group named Test having a 20 MB/s limit.
VBoxManage storageattach "Test VM" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium test.vdi --bandwidthgroup Limit
Adds a new disk to the SATA controller and assigns the bandwidth group Limit to it.
VBoxManage storageattach "Test VM" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium test.vdi --bandwidthgroup none
Removes the bandwidth limit from the disk.
VBoxManage bandwidthctl "Test VM" --name Limit --add disk --limit 10
Changes the limit of bandwidth group Limit to 10 MB/s. If the VM is running the limit will be picked up
immediately.