2014-01-28 82 views
1

我試圖從我的家庭計算機上的工作環境中獲得我的流量計安裝設置,但我一直在遇到問題。我已經卸載並重新安裝了兩次Virtualbox和Vagrant。在工作中,一切都按預期工作。在家裏,什麼都沒有。我遊民文件如下:在一臺計算機上但不在另一臺計算機上的流量增加規定

Vagrant::configure("2") do |config| 

    config.vm.box = "saucy64" 
    config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-amd64-vagrant-disk1.box" 
    config.vm.network :private_network, ip: "192.168.33.10" 

    # Allow more memory usage for the VM 
    config.vm.provider :virtualbox do |v| 
    v.customize ["modifyvm", :id, "--memory", "1024"] 
    end 

    # Fix rights and permissions on shared folder 
    config.vm.synced_folder ".", "/vagrant/", :mount_options => [ "dmode=777", "fmode=666" ] 
    config.vm.synced_folder "./www", "/vagrant/www/", :mount_options => [ "dmode=775", "fmode=644" ], :owner => 'vagrant', :group => 'www-data' 

    # Set the timezone to something useful 
    config.vm.provision :shell, :inline => "echo \"Europe/London\" | sudo tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata" 
    # Make sure APT is up to date 
    config.vm.provision :shell, :inline => "apt-get update --fix-missing" 
    # Fix locales 
    # config.vm.provision :shell, :inline => "apt-get -y install language-pack-en" 

    config.vm.provision :puppet do |puppet| 
    puppet.facter = { "fqdn" => "dev.oraculum2.local", "hostname" => "www" } 
    puppet.manifests_path = "puppet/manifests" 
    puppet.manifest_file = "oraculum2.pp" 
    puppet.module_path = "puppet/modules" 
    puppet.options = "--hiera_config /vagrant/hiera.yaml" 
    end 

end 

我的輸出是這樣的:

$ vagrant up --provision 
Bringing machine 'default' up with 'virtualbox' provider... 
[default] Importing base box 'saucy64'... 
[default] Matching MAC address for NAT networking... 
[default] Setting the name of the VM... 
[default] Clearing any previously set forwarded ports... 
[default] Clearing any previously set network interfaces... 
[default] Preparing network interfaces based on configuration... 
[default] Forwarding ports... 
[default] -- 22 => 2222 (adapter 1) 
[default] Running 'pre-boot' VM customizations... 
[default] Booting VM... 
[default] Waiting for machine to boot. This may take a few minutes... 
Timed out while waiting for the machine to boot. This means that 
Vagrant was unable to communicate with the guest machine within 
the configured ("config.vm.boot_timeout" value) time period. This can 
mean a number of things. 

If you're using a custom box, make sure that networking is properly 
working and you're able to connect to the machine. It is a common 
problem that networking isn't setup properly in these boxes. 
Verify that authentication configurations are also setup properly, 
as well. 

If the box appears to be booting properly, you may want to increase 
the timeout ("config.vm.boot_timeout") value. 

當然,我試圖增加啓動超時但有相同的效果。我試圖在GUI中啓動,但它進入黑屏並且從不改變。

使用: 流浪1.4.1和4.3.6的virtualbox

我是一個Ubuntu 12.04的機器上,這就是一樣的工作,以及。

我試着用Vagrant 1.4.3以及相同的結果。我迷失了,因爲它在工作中工作得很好。有任何想法嗎?

+0

在嘗試流浪之前,能否恢復(或重新下載)virtualbox映像並正常啓動?如果通過GUI引導進入黑屏,那麼它很可能是vb映像或本地vb配置。不看起來像流浪... –

+0

我試圖重新下載它,但仍然黑屏。試圖重新安裝Virtualbox,一無所獲。我很難過。 – dansackett

+0

當然(ish)不是那麼流浪的。你有沒有嘗試過使用內置的virtualbox來流浪?看一下[Vagrant的入門](http://docs.vagrantup.com/v2/getting-started/index.html)頁面,使用那裏提到的精確框32。也許嘗試另一個虛擬機提供商。 –

回答

2

我最初會建議有網絡問題,但是我錯過了「GUI進入黑屏並從不改變」部分。

這聽起來好像VirtualBox設置本身似乎有一些麻煩。我會建議用另一個盒子來嘗試它,以確定它是否與盒子有問題(可能是下載失敗?)或VirtualBox本身。

+0

我試了一個不同的盒子,但發生了相同的結果。我想這是一個Virtualbox的東西,但我試圖重新下載並重新配置爲無效... – dansackett

1

確保box user〜vagrant/.ssh/authorized_keys包含pub key以匹配您的流浪私鑰。

我有一個非常類似的問題。流浪漢會中止,虛擬盒子開始就好了。 我會得到這樣的:

$ vagrant up 
Bringing machine 'default' up with 'virtualbox' provider... 
[default] Clearing any previously set forwarded ports... 
[default] Clearing any previously set network interfaces... 
[default] Preparing network interfaces based on configuration... 
[default] Forwarding ports... 
[default] -- 22 => 2222 (adapter 1) 
[default] Booting VM... 
[default] Waiting for machine to boot. This may take a few minutes... 
The guest machine entered an invalid state while waiting for it 
to boot. Valid states are 'starting, running'. The machine is in the 
'aborted' state. Please verify everything is configured 
properly and try again. 

If the provider you're using has a GUI that comes with it, 
it is often helpful to open that and watch the machine, since the 
GUI often has more helpful error messages than Vagrant can retrieve. 
For example, if you're using VirtualBox, run `vagrant up` while the 
VirtualBox GUI is open. 

我看着開放式控制檯,看看它啓動,然後中止。 所以我產生了調試。

VAGRANT_LOG=debug vagrant up >> DEBUG.LOG.0 2>&1 & 

我通過數據走,看見裏面:

DEBUG ssh: == Net-SSH connection debug-level log END == 
INFO ssh: SSH not up: #<Vagrant::Errors::SSHAuthenticationFailed: SSH authentication failed! This is typically caused by the public/private 
keypair for the SSH user not being properly set on the guest VM. Please 
verify that the guest VM is setup with the proper public key, and that 
the private key path for Vagrant is setup properly as well.> 

我是從供應商開始了虛框,登錄,檢查和流浪漢的關鍵是腐敗。 取而代之。測試ssh作爲無密碼的流浪者。關機-h現在。流浪... 成功!

從vagrant up的輸出是誤導。在調試中,我們可以看到它知道它在哪裏失敗了,但是這並沒有充分處理,以告訴用戶該盒子/可能很好,通信很糟糕。

0

運行下面的命令在終端上

$ vagrant ssh-config 

然後檢查IdentityFile值輸出,例如:

IdentityFile /home/{USERNAME}/.vagrant.d/insecure_private_key 

然後切換或登錄到相應的SSH用戶和運行vagrant up,前登錄SSH用戶,您必須使用vagrant suspend命令「暫停流浪者箱子」。

相關問題