2014-04-20 8 views
5

i-Box mit lokalen Datei von https://dl.dropboxusercontent.com/s/x1085661891dhkz/lxc-centos6.5-2013-12-02.boxvagrant nicht finden können bestehende Box

vagrant Box hinzufügen war hinzufügen centos centos.box

vagrant init centos

meine Schale:

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 
+1

Verwenden Sie 'vagrant box add/Pfad/zu/lxc-centos6.5-2013-12-02.box', um die Box hinzuzufügen, wenn Sie sie bereits heruntergeladen haben. –

Antwort

7

Fügen Sie die lokale Boxdatei mit dem vollständigen Pfad zum Dateiprotokoll-URI hinzu. Zum Beispiel:

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

(die genaue Lage hängt natürlich davon ab, wo Sie die Datei gesetzt haben)

0

Ich habe ein ähnliches Problem gelöst Vagrant auf die neueste Version zu aktualisieren und auf magische Weise funktioniert es ... :/

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

Wenn Sie auf Fenster sind, können Sie den Pfad als definieren:

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

Beachten Sie die .box am Ende des Pfades.

Dann können Sie cd in das Verzeichnis, wenn Sie nicht schon da sind und tun vagrant up.

Verwandte Themen