2014-09-04 47 views
0

我無法爲我的配置中的虛擬機指定IP,這會導致流氓崩潰。流氓崩潰在配置中的B/C專用網絡線

我Vagrantfile在這一點上:

# -*- mode: ruby -*- 
# vi: set ft=ruby : 

Vagrant.configure(2) do |config| 
    config.vm.box = "puphpet/centos65-x64" 
    config.vm.network "private_network", ip: "192.168.33.10" 
end 

還有更多的在那裏,但我也淪落至此。 如果我運行vagrant up

Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Importing base box 'puphpet/centos65-x64'... 
==> default: Matching MAC address for NAT networking... 
==> default: Checking if box 'puphpet/centos65-x64' is up to date... 
==> default: Setting the name of the VM: website_default_1409831132235_3604 
==> default: Clearing any previously set network interfaces... 
==> default: Preparing network interfaces based on configuration... 
    default: Adapter 1: nat 
    default: Adapter 2: hostonly 
==> default: Forwarding ports... 
    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! 
GuestAdditions versions on your host (4.3.14) and guest (4.3.10) do not match. 
<snipped - guest additions installation> 
==> default: Checking for guest additions in VM... 
==> default: Configuring and enabling network interfaces... 
==> default: Forcing shutdown of VM... 
==> default: Destroying VM and associated drives... 
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/plugins/guests/redhat/cap/configure_networks.rb:31:in `configure_networks_default': wrong number of arguments (1 for 2) (ArgumentError) 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/plugins/guests/redhat/cap/configure_networks.rb:19:in `configure_networks' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/lib/vagrant/capability_host.rb:111:in `call' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/lib/vagrant/capability_host.rb:111:in `capability' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/lib/vagrant/guest.rb:43:in `capability' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/plugins/providers/virtualbox/action/network.rb:132:in `call' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/lib/vagrant/action/warden.rb:34:in `call' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/plugins/providers/virtualbox/action/clear_network_interfaces.rb:26:in `call' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.4/lib/vagrant/action/warden.rb:34:in `call' 
    <snipped> 

如果我禁用了專用網線它的工作原理,但當時我沒有在IP控制。

我測試過的另類書寫方法(是的,我是絕望):

config.vm.network :private_network, :ip => "192.168.33.10" 

嘗試使用和不使用:網絡掩碼參數(如堆棧跟蹤大約參數)

我細節:

  • 的MacOS 10.9.4
  • 紅寶石2.1.2p95
  • 流浪1.6.4
  • 的VirtualBox 4.3.14

我曾與幾個不同的盒子(所有基於CentOS)測試此,問題是與他們一樣,在網上搜索了我的一切可以想到的。

全部無濟於事。不知道如何繼續,請幫忙?

+0

如果您發現問題在某些方面無效,請提供一條評論,告訴您爲什麼不滿意它。這應該是一個教育網站記得嗎? – Blizz 2014-09-04 12:07:52

回答

6

我有相同的環境,剛剛也遇到過這個。看起來這是一個已知的錯誤:github.com/mitchellh/vagrant/issues/4458

在修復此錯誤之前,恐怕您唯一的選擇是手動將Vagrant修改爲包含在問題報告中的詳細信息或降級到Vagrant 1.6.3。我已經降級到1.6.3並且可以確認這是按預期工作的。

+0

謝謝,猜你的搜索比我的搜索更有成效。至少我不認爲我再愚蠢;) – Blizz 2014-09-04 12:27:53

3

我與Vagrant 1.6.4有同樣的錯誤,它似乎是在Vagrant 1.6.5中修復的。