这是我收到的错误代码:
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` v-csc-1 /tmp/vagrant-chef-1/chef-solo-1/cookbooks
这就是我的 Vagrantfile 的样子:
Vagrant::Config.run do |config|
config.vm.box = "ubuntu-lucid-32"
config.vm.forward_port 80, 8080
config.vm.share_folder "mysite.de", "/var/www/mysite.de", "../data"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "/cookbooks"
chef.add_recipe "apache2"
chef.add_recipe "php"
chef.add_recipe "mysql"
chef.add_recipe "vim"
chef.add_recipe "git"
chef.add_recipe "openssl"
chef.json = { :mysql_password => "whatever" }
end
end
额外信息:我使用 OS X Lion 作为我的主机。
答案1
我遇到了同样的问题,结果发现我的 chef.cookbooks_path 不存在。就你的情况而言,你的主机上是否存在名为“/cookbooks”的目录?你的意思是将路径设置为根级目录吗?
如果您在执行 vagrant 的目录中有一个名为“cookbooks”的子目录,则应使用这个值(不带前导斜杠):
chef.cookbooks_path =“食谱”