网络上的虚拟盒子限制带宽 [英] Virtual Box limit Bandwith on network

查看:152
本文介绍了网络上的虚拟盒子限制带宽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用虚拟机VirtualBox

I am using virtual machine VirtualBox

现在,我需要限制带宽.我有2个虚拟机正在运行.一个只是为了好玩.一种是用于重要的数据库访问.如果数据库机"没有使用最大带宽,我需要告诉有趣的机器"在网络上以较低的优先级使用带宽.

Now, I need to limit bandwith. I have 2 Virtual Machines running. One is just for fun. One is for important database access. I need to tell the "fun machine" to just use bandwith on network with less priority if the "database machine" is not using maximum of the bandwith.

我阅读了 但是我在Windows上工作.

I read this But I am working on Windows.

如果您有任何建议,那就太好了.

Would be great if you have any suggestions.

推荐答案

更新

从VirtualBox 4.2开始,网络子系统支持限制连接的最大带宽.这些命令还没有图形用户界面,因此您必须使用VBoxManage命令行来管理设置.从手册中:

Starting with VirtualBox 4.2, the networking subsystem has support for limiting the maximum bandwidth of a connection. There isn't a graphical user interface for the commands yet so you will have to use the VBoxManage command line to manage the settings. From the manual:

限制是通过VBoxManage配置的.下面的示例创建一个名为"Limit"的带宽组,将限制设置为20 Mbit/s,并将该组分配给VM的第一个和第二个适配器:

VBoxManage bandwidthctl "VM name" add Limit --type network --limit 20m
VBoxManage modifyvm "VM name" --nicbandwidthgroup1 Limit
VBoxManage modifyvm "VM name" --nicbandwidthgroup2 Limit

重要说明:VirtualBox仅限制来自VM的出站流量.它不限制传入带宽.可以在VirtualBox手册的第6章-虚拟网络中找到其他信息: http://www .virtualbox.org/manual/ch06.html#network_bandwidth_limit

Important Note: VirtualBox only limits outbound traffic from the VM. It does not limit incoming bandwidth. Additional information can be found in the VirtualBox manual, chapter 6 - Virtual Networking: http://www.virtualbox.org/manual/ch06.html#network_bandwidth_limit

原始答案

这确实是一种困难的情况-VirtualBox或Windows都不提供受支持的本机方式来处理您所请求的流量管理.好消息是VirtualBox团队正在努力解决您的问题-您可能在最近的发行版中已经注意到,他们已经添加了对CPU使用率控制的适当支持.希望4.1或更高版本中的某些功能将具有您想要的功能.

This really is kind of a difficult situation - neither VirtualBox or Windows provide a supported, native way to handle traffic management like you have requested. The good news is that the VirtualBox team is working on a solution to your problem - you may have noticed in recent releases they have added in proper support for CPU usage controls. Hopefully something in the 4.1 or later releases will have the feature you desire.

那么您在这段时间内可以做什么?我建议查看类似 NetLimiter 之类的程序,以便您可以运行Window 7"fun "来宾.您将能够配置各种限制,以确保它不会破坏您的整体网络访问.

So what can you do in the mean time? I would suggest looking at programs like NetLimiter that you can run your Window 7 "fun" guest. You will be able to configure all sorts of limits to ensure it doesn't disrupt your overall network access.

这篇关于网络上的虚拟盒子限制带宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆