Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vagrant can't find existing box

Tags:

vagrant

i was add box with local file from https://dl.dropboxusercontent.com/s/x1085661891dhkz/lxc-centos6.5-2013-12-02.box

vagrant box add centos centos.box

vagrant init centos

my shell:

cheneytekimbp:vagrant-centos zicjin$ vagrant box list
centos  (lxc, 0)
lucid32 (virtualbox, 0)
cheneytekimbp:vagrant-centos zicjin$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'centos' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Adding box 'centos' (v0) for provider: virtualbox
    default: Downloading: centos
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 /Users/zicjin/Work/vagrant-centos/centos
like image 251
zicjin Avatar asked Apr 20 '14 13:04

zicjin


3 Answers

Add the local box file using the full path with the file protocol URI. For instance:

vagrant box add centos file:///Users/zicjin/Work/vagrant-centos/centos.box

(the exact location of course depends on where you've put the file)

like image 58
Sergey Evstifeev Avatar answered Sep 30 '22 19:09

Sergey Evstifeev


$ vagrant box add CentOSMinimal  https://dl.dropbox.com/u/7225008/Vagrant/CentOS-6.3-x86_64-minimal.box
 $ vagrant init CentOSMinimal
 $ vagrant up
like image 36
Ganesan Murugesan Avatar answered Sep 30 '22 19:09

Ganesan Murugesan


If you're on windows, you can define the path as:

vagrant box add box_name "C:\Users\JohnDoe\blahblah\box_name.box"

Notice the .box at the end of the path.

Then you can cd into the directory if you're not already there and do vagrant up.

like image 33
Emile Bergeron Avatar answered Sep 30 '22 18:09

Emile Bergeron