virtualbox - 做 vagrant up 时出错

标签 virtualbox vagrant base vagrantfile

执行 vagrant up 时出现此错误:

anr@anr-Lenovo-G505s ~ $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Adding box 'base' (v0) for provider: virtualbox
default: Downloading: base
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

Couldn't open file /home/anr/base

这是我拥有的 Vagrantfile:
 # -*- mode: ruby -*-
 # vi: set ft=ruby :
 Vagrant.configure('2') do |config|
   config.vm.box      = 'precise32'
   config.vm.box_url  = 'http://files.vagrantup.com/precise32.box'
   config.vm.hostname = 'bootcamp'
   config.ssh.forward_agent = true

config.vm.provider 'vmware_fusion' do |v, override|
  override.vm.box     = 'precise64'
  override.vm.box_url = 'http://files.vagrantup.com/precise64_vmware.box'
end

config.vm.provider 'parallels' do |v, override|
  override.vm.box = 'parallels/ubuntu-12.04'
  override.vm.box_url = 'https://vagrantcloud.com/parallels/ubuntu-12.04'

# Can be running at background, see https://github.com/Parallels/vagrant-parallels/issues/39
v.customize ['set', :id, '--on-window-close', 'keep-running']
end

config.vm.network :forwarded_port, guest: 3000, host: 3000

 config.vm.provision :puppet do |puppet|
   puppet.manifests_path = 'puppet/manifests'
   puppet.module_path    = 'puppet/modules'
 end

结尾

这是我的机器设置:
 vagrant -v     Vagrant 1.6.2
 VirtualBox     4.3.2
 Linux Mint 15 Olivia Cinammon

最佳答案

我遇到了这个问题。我正在创建文件夹,并使用以下命令:

vagrant init
vagrant box add hashicorp/precise64
vagrant up

并收到有关下载远程文件的错误。

尝试这个:
create a folder,
cd folder
vagrant init hashicorp/precise64 (or whatever vm you want to run)
vagrant up

希望这能解决您的问题

关于virtualbox - 做 vagrant up 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23926861/

相关文章:

virtualbox - 如何使单个virtualbox窗口全屏

windows - 是否可以在 Ubuntu Virtual box 机器中运行 Vagrant box?

virtualbox - 在 Windows 上的 VirtualBox 上运行的 Ubuntu 上启用 kvm

c++ - 通过类型转换切掉重写的方法

c# - 将 10 进制数转换为 .NET 中任意进制数的最快方法?

Android:ListView 进行搜索过滤

linux - Vagrant 的麻烦 - "404 - Not Found"

打包和重新打包之间的 Vagrant 区别

elasticsearch - 从 vagrant 访问 elasticsearch

vagrant - 单个 Vagrant 文件中的多个提供者?