Vagrant + Chef:配置错误“虚拟机上缺少Chef所需的共享文件夹”。

时间:2015-01-16 00:37:59

标签: django vagrant chef virtualbox

我已经使用Chef(+ library chef)安装了Vagrant + Virtualbox。当我第一次vagrant up时,烹饪书会正确加载。但是,当我之后进行配置时(vagrant provisionvagrant reload --provisionvagrant 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。

2 个答案:

答案 0 :(得分:107)

似乎同步文件夹存在错误,这会清除缓存并为我修复它。 (来自您的项目目录)

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

https://github.com/mitchellh/vagrant/issues/5199

编辑:流浪汉1.7.4

中的should be fixed

答案 1 :(得分:-3)

这对于Berkshelf和Librarian的Vagrant插件来说是一个相当普遍的问题。只是习惯了运行该命令。

避免它的方法是使用类似Test-Kitchen的东西而不是Vagrant插件。但这不是替代品。