我安装了vagrant和virtual box。我在Yosemite中运行此命令:
vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
输出结果为:
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'lucid32' (v0) for provider:
box: Downloading: http://files.vagrantup.com/lucid32.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Empty reply from server
我在代理服务器后面运行它。这是我的Vagrantfile:
Vagrant.configure("2") do |config|
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "http://10.3.100.207:8080"
config.proxy.https = "http://10.3.100.207:8080"
config.proxy.no_proxy = "localhost,127.0.0.1"
end
end
出了什么问题?
答案 0 :(得分:0)
vagrant box add
无法从Vagrantfile读取,因此它不会知道您的代理配置。
最好/最简单的方法是直接从浏览器http://files.vagrantup.com/lucid32.box单独下载文件,然后执行vagrant box add lucid32 <path to the downloaded box file>
,然后将该框加载到vagrant box文件夹中,然后您就可以运行来自已安装的盒子的VM。