【问题标题】:Vagrant + Chef: Error in provision "Shared folders that Chef requires are missing on the virtual machine."Vagrant + Chef:配置错误“虚拟机上缺少 Chef 所需的共享文件夹。”
【发布时间】:2015-03-14 13:27:47
【问题描述】:

我使用 Chef(+library chef)安装了 Vagrant + Virtualbox。当我第一次做vagrant up 时,食谱会正确加载。但是,当我事后进行配置时(无论是 vagrant provisionvagrant 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。

【问题讨论】:

    标签: django vagrant chef-infra virtualbox


    【解决方案1】:

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

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

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

    编辑:这个 should be fixed 在 vagrant 1.7.4

    【讨论】:

      【解决方案2】:

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

      避免它的方法是使用像 Test-Kitchen 这样的东西而不是 Vagrant 插件。不过,这不是直接替代品。

      【讨论】:

      • “习惯于运行该命令”- OP 声明该命令不起作用,因此无济于事。
      • vagrant reload --provision 通常会修复它,有时需要尝试几次才能完全收敛。
      猜你喜欢
      • 2018-07-06
      • 1970-01-01
      • 1970-01-01
      • 2018-11-29
      • 2013-05-23
      • 1970-01-01
      • 2023-04-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多