箱子工作正常。然後我停下了一個(當時唯一一個在跑),現在我無法讓他們中的任何一個回來。Vagrant配置錯誤 - 「必須指定一個框。」
運行vagrant up [name]
給我下面的錯誤,無論哪個我挑或是我離開它vagrant up
他們都上來:
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* A box must be specified.
運行最新版本的流浪的(1.7.4 )。
這是我Vagrantfile的全部,包括(以防萬一)註釋:運行vagrant status
的
# Search for boxes here: https://atlas.hashicorp.com/boxes/search
# Refer to commands_vagrant.txt for command reference
Vagrant.configure("2") do |config|
# Globally defined variables
config.vm.synced_folder "./", "/var/www/public"
# CentOS 6.5, Apache 2.2.15, MySQL 5.5.36 (-u root), PHP 5.3.28
# Note: If PHP session keys don't work, set permissions to 777 (or other more restrictive, but this is guaranteed to work) on /var/lib/php/session
config.vm.define "php5dot3", primary: true do |php5dot3|
config.vm.box = "smallhadroncollider/centos-6.5-lamp"
config.vm.network :forwarded_port, guest: 80, host: 4567
end
# Ubuntu 14.04 (SSH pw: vagrant), Apache 2.4.12, MySQL 5.5.43 (-u root -p root), PHP 5.6.10
config.vm.define "php5dot6" do |php5dot6|
config.vm.box = "scotch/box"
config.vm.network :forwarded_port, guest: 80, host: 4568
end
end
結果:
Current machine states:
php5dot3 poweroff (virtualbox)
php5dot6 poweroff (virtualbox)
運行vagrant global-status
的結果:
id name provider state directory
--------------------------------------------------------------------------
e1f3c85 default virtualbox poweroff /home/sam/Web
c588d51 php5dot6 virtualbox poweroff /home/sam/Web
4e71c50 php5dot3 virtualbox poweroff /home/sam/Web
「默認」是單數箱我在Vagrantfile收到我多機上週工作。 (有關?)
運行vagrant box list
的結果:
scotch/box (virtualbox, 2.0)
smallhadroncollider/centos-6.5-lamp (virtualbox, 1.0.0)
任何幫助,將不勝感激,謝謝。
我在這裏創建了類似的問題:https://github.com/mitchellh/vagrant/issues/6245 – generalconsensus
你運行過'bash init.sh'嗎?前? – RidRoid
不,永遠不會運行在任何有關的bash腳本放浪。 – SamHH