Question

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
Was it helpful?

Solution

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)

OTHER TIPS

$ vagrant box add CentOSMinimal  https://dl.dropbox.com/u/7225008/Vagrant/CentOS-6.3-x86_64-minimal.box
 $ vagrant init CentOSMinimal
 $ vagrant up

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.

I've solved a similar issue upgrading Vagrant to the latest version and magically it works... :/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top