0

我已经建立了一个非常基本的基础架构,其中包含一个工作站、一个操作码托管的 Chef 服务器和一个 vagrant VM 节点。

在我的工作站上,我使用了命令vagrant up。这下载了 vagrant VM 来设置一个节点。但是,vagrant VM 节点无法连接到 Internet。如何更改虚拟机的代理设置?

4

1 回答 1

2

您可以使用vagrant-proxyconf插件:

vagrant plugin install vagrant-proxyconf

然后为所有使用$HOME/.vagrant.d/Vagrantfile. 例如:

Vagrant.configure("2") do |config|
  config.proxy.http     = "http://192.168.0.2:3128/"
  config.proxy.https    = "http://192.168.0.2:3128/"

  # exclude your internal networks, including the Vagrant ones
  config.proxy.no_proxy = "localhost,127.0.0.1,192.168.33.*,.example.com"
end
于 2014-02-07T12:49:23.550 回答