LoginSignup
34
35

More than 5 years have passed since last update.

vagrant provisionでコケる

Last updated at Posted at 2015-03-13

vagrantでchef_soloでprovisionしようとした上で、vagrant provisionとかvagrant reload --provisionをしようとすると、意味不明のコケ方をする。

==> default: [2015-03-13T20:13:49+09:00] ERROR: Role Base-settings (included by 'top level') is in the runlist but does not exist. Skipping expand.
==> default: 
==> default: ================================================================================
==> default: Error expanding the run_list:
==> default: ================================================================================
==> default: 

とログは言っているのだが、vagrant destoryして作りなおすとうまく行く。

よく見ると

正常時

==> default: Mounting shared folders...
    default: /vagrant => /Users/shn/Documents/projects/SexyProj/Vagrant
    default: /tmp/vagrant-chef/8038246c2f51c3715e8e1a90fc487018/roles => /Users/shn/Documents/projects/SexyProj/chef-repo/roles
    default: /tmp/vagrant-chef/bf6c80968df8f6833cb062fcce85c668/cookbooks => /Users/shn/Documents/projects/SexyProj/chef-repo/cookbooks
    default: /tmp/vagrant-chef/7f1180f0b82febda17b1eeed5e0cec8b/cookbooks => /Users/shn/Documents/projects/SexyProj/chef-repo/site-cookbooks
    default: /tmp/vagrant-chef/c578295aa517d0324ff62f7f507bfa6b/data_bags => /Users/shn/Documents/projects/SexyProj/chef-repo/data_bags
==> default: Running provisioner: chef_solo...

異常時

==> default: Mounting shared folders...
    default: /vagrant => /Users/shn/Documents/projects/SexyProj/Vagrant

で、chef用のディレクトリがマウントできていないっぽい。

試しに、/tmp/vagrant-chefをrenameしてみると、

Shared folders that Chef requires are missing on the virtual machine.
This is usually due to configuration changing after already booting the
machine. The fix is to run a `vagrant reload` so that the proper shared
folders will be prepared and mounted on the VM.```
と怒られた。

解決

Google先生とStackOverflow先生によると、これはbugらしい (http://stackoverflow.com/questions/27975541/vagrant-chef-error-in-provision-shared-folders-that-chef-requires-are-missin)

rm .vagrant/machines/default/virtualbox/synced_folders
vagrant reload --provision

これで無事解決

34
35
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
34
35