Vagrant + Chef:提供错误“虚拟机上缺lessChef所需的共享文件夹”。

我已经使用厨师(+图书馆厨师)安装了Vagrant + Virtualbox。 当我第一次vagrant up时,食谱正确装载。 然而,当我提供后来( vagrant reload --provision 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. 

我到处search,唯一的解决办法是做vagrant reload --provision ,这个工作达到了stream浪1.3.1。

它似乎有一个同步文件夹的错误,这将清除caching并为我修复它。 (从你的项目目录)

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

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

编辑:这应该是固定在stream浪1.7.4

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

避免这种情况的方法是使用Test-Kitchen而不是Vagrant插件。 尽pipe如此,这不是一个简单的替代scheme。