2014-10-20 104 views
1

我想在Windows 7 PC上使用Vagrant和Chef創建一個Fedora-20虛擬機,並將其配置爲LAMP服務器。我有Vagrant 1.6.5。並安裝vagrant-omnibus插件(1.4.1)。Vagrant Omnibus插件無法在我的Windows 7電腦上工作

我的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. 

看來,綜合插件沒有安裝廚師在虛擬機上。我還需要做些什麼才能在我的電腦上正常工作?

這是我流浪的文件:

# -*- 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 

這裏是STDOUT:

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. 

謝謝!

+0

你能得到類似'vagrant up --debug> vagrant.log 2>&1'和gist/pastebin的調試日誌嗎? – tmatilai 2014-10-21 06:22:04

+0

你也可以嘗試使用特定的版本:'config.omnibus.chef_version =「11.16.4」' – tmatilai 2014-10-21 06:22:52

回答

0

我有完全相同的問題。

我做了一些指定廚師版本的實驗,並得到了一個錯誤與無聲失敗的對比。

這條線:

config.omnibus.chef_version = 「11.16.4」

結果:

$遊民提供有在此配置錯誤 機器。請修復以下錯誤並重試:

流浪漢: * '11.16.4'不是主廚的有效版本。

我也試過:

config.omnibus.chef_version = 「11.16.4-1」

其產生:

  • '11 .16.4 -1'不是廚師的有效版本。

我懷疑有一個網絡/防火牆類型的層阻礙我。你是否支持公司防火牆/代理?如果沒有,也許這是別的。

0

我遇到了這個確切的問題。解決方案是降級到Vagrant 1.6.2,直到Vagrant版本1.7.1發佈。兩個版本都爲我解決了這個問題。

相關問題