【问题标题】:Vagrant Omnibus Plugin Not Working on My Windows 7 PCVagrant Omnibus 插件无法在我的 Windows 7 PC 上运行
【发布时间】:2014-12-13 03:23:03
【问题描述】:

我想在我的 Windows 7 PC 上使用 Vagrant 和 Chef 启动 Fedora-20 VM,并将其配置为 LAMP 服务器。我有流浪者 1.6.5。并且安装了 vagrant-omnibus 插件 (1.4.1)。

我的 Vagrantfile 包含“config.omnibus.chef_version = :latest”语句,但在运行“vagrant up”后,不会发生预期的配置。相反,

==> default: Running provisioner: chef_solo...
The chef binary (either `chef-solo` or `chef-client`) was not found on
the VM and is required for chef provisioning. Please verify that chef
is installed and that the binary is available on the PATH.

omnibus 插件似乎没有在 VM 上安装 Chef。我还需要做什么才能让它在我的 PC 上运行?

这是我的 Vagrant 文件:

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
  config.vm.box = "chef/fedora-20"
  config.omnibus.chef_version = :latest
  config.vm.network "forwarded_port", guest: 80, host: 4567
  config.vm.synced_folder "shared-files", "/var/www"
  config.vm.provision "chef_solo" do |chef|
    chef.cookbooks_path = "chef-recipes/cookbooks"
    chef.roles_path = "chef-recipes/roles"
    chef.add_role "lamp_stack"
  end
end

这是标准输出:

C:\Users\wbj\f20>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'chef/fedora-20'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'chef/fedora-20' is up to date...
==> default: Setting the name of the VM: f20_default_1413836754304_46591
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 80 => 4567 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /var/www => C:/Users/wbj/f20/shared-files
    default: /vagrant => C:/Users/wbj/f20
    default: /tmp/vagrant-chef-3/chef-solo-2/roles => C:/Users/wbj/f20/chef-recipes/roles
    default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks => C:/Users/wbj/f20/chef-recipes/cookbooks
==> default: Running provisioner: chef_solo...
The chef binary (either `chef-solo` or `chef-client`) was not found on
the VM and is required for chef provisioning. Please verify that chef
is installed and that the binary is available on the PATH.

谢谢!

【问题讨论】:

  • 你能得到类似vagrant up --debug >vagrant.log 2>&1和gist/pastebin之类的调试日志吗?
  • 您也可以尝试使用特定版本:config.omnibus.chef_version = "11.16.4"

标签: vagrant chef-solo


【解决方案1】:

我遇到了这个确切的问题。解决方案是降级到 Vagrant 1.6.2,直到 Vagrant 版本 1.7.1 发布。两个版本都为我解决了这个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-08
    • 2011-12-01
    • 2014-07-28
    • 2011-02-06
    • 2015-10-13
    • 1970-01-01
    相关资源
    最近更新 更多