我已经使用Chef(+ library chef)安装了Vagrant + Virtualbox。当我第一次vagrant up
时,烹饪书会正确加载。但是,当我之后进行配置时(vagrant provision
,vagrant reload --provision
或vagrant up --provision
我收到此错误:
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.
我到处搜索,唯一的解决方案是vagrant reload --provision
,这可以达到Vagrant 1.3.1。
答案 0 :(得分:107)
似乎同步文件夹存在错误,这会清除缓存并为我修复它。 (来自您的项目目录)
rm .vagrant/machines/default/virtualbox/synced_folders
vagrant reload --provision
https://github.com/mitchellh/vagrant/issues/5199
编辑:流浪汉1.7.4
答案 1 :(得分:-3)
这对于Berkshelf和Librarian的Vagrant插件来说是一个相当普遍的问题。只是习惯了运行该命令。
避免它的方法是使用类似Test-Kitchen的东西而不是Vagrant插件。但这不是替代品。