ubuntu – Chef无法运行,因为无法访问cookbooks文件夹

前端之家收集整理的这篇文章主要介绍了ubuntu – Chef无法运行,因为无法访问cookbooks文件夹前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图从 this box开始使用Vagrant实例,然后开始我的厨师食谱.流浪档案:
Vagrant::Config.run do |config|
  config.vm.Box = "sausy64"
  config.vm.Box_url = "http://cloud-images.ubuntu.com/vagrant/saucy/20131113/saucy-server-cloudimg-amd64-vagrant-disk1.Box"

  config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = "."
    chef.add_recipe "test"
  end
end

跑完流浪后,我得到:

[default] Importing base Box 'sausy64'...
[default] Matching MAC address for NAT networking...
[default] Clearing any prevIoUsly set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Creating shared folders Metadata...
[default] Clearing any prevIoUsly set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] -- v-csc-1: /tmp/vagrant-chef-1/chef-solo-1/cookbooks
[default] Running provisioner: Vagrant::Provisioners::ChefSolo...
[default] Generating chef JSON and uploading...
[default] Running chef-solo...
[2013-11-16T18:15:15+00:00] INFO: *** Chef 10.12.0 ***
[2013-11-16T18:15:16+00:00] INFO: Setting the run_list to ["recipe[test]"] from JSON
[2013-11-16T18:15:16+00:00] INFO: Run List is [recipe[test]]
[2013-11-16T18:15:16+00:00] INFO: Run List expands to [test]
[2013-11-16T18:15:16+00:00] INFO: Starting Chef Run for vagrant-ubuntu-saucy-64
[2013-11-16T18:15:16+00:00] INFO: Running start handlers
[2013-11-16T18:15:16+00:00] INFO: Start handlers complete.
bash: line 2:  1494 Killed                  chef-solo -c /tmp/vagrant-chef-1/solo.rb -j /tmp/vagrant-chef-1/dna.json
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

我做了vagrant ssh来检查发生了什么,似乎无法访问共享文件夹cookbook.

vagrant@vagrant-ubuntu-saucy-64:~$cd /tmp/vagrant-chef-1/chef-solo-1/cookbooks/
vagrant@vagrant-ubuntu-saucy-64:/tmp/vagrant-chef-1/chef-solo-1/cookbooks$ls
... cpu goes to 100% and anything shows ...

我该怎么做才能让它发挥作用?

有同样的问题.

经过一些调查后,我意识到问题出在VirtualBox guest虚拟机添加中,预装了这些Ubuntu 13.10 Vagrant盒子.捆绑版本(4.2.16)包含bug when working with shared folders on a Kernel 3.11,根据VirtualBox Changelog,此错误在4.2.20中修复.

所以,我刚刚将VirtualBox guest添加内容更新为实际版本,我的共享文件夹再次与cookbook一起工作.这可以通过花哨的vagrant插件来完成

vagrant plugin install vagrant-vbguest

在VM启动期间自动升级guest虚拟机添加.

猜你在找的Ubuntu相关文章