2015-02-06 87 views
1

我試圖在虛擬機內部運行流浪漢,不幸的是,它隨機計數失敗(它以前每隔一次都會失敗)。但是當我將日誌級別設置爲調試並運行時,它不會出錯。尋找如何調試此問題的建議。由於連接超時錯誤導致的隨機流浪失敗

主機:RHEL 6.5(聖地亞哥)2芯4G衝壓時,ESXi 5.1 旅客機:RHEL 6.5(客戶添置版本:4.1.18)/ CENTOS 6.5(客戶添置版本:4.3.8)

流浪版本 - 1.6.5 的VirtualBox 4.3.20 廚師開發工具包版本:0.3.6 流浪漢插件 無業遊民,berkshelf(4.0.2) 流浪者登錄(1.0.1系統) 無業遊民,綜合(1.4。 1) 流氓份額(1.1.3,系統)

失敗運行

Bringing machine 'default' up with 'virtualbox' provider... 
    default: The Berkshelf shelf is at "/root/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150206-18541-kdy12t-default" 
==> default: Sharing cookbooks with VM 
==> default: Importing base box 'rhel65-1.0.0'... 
==> default: Matching MAC address for NAT networking... 
==> default: Setting the name of the VM: XXXXXXXXXX_1423257225720_47393 
==> default: Clearing any previously set forwarded ports... 
==> default: Updating Vagrant's Berkshelf... 
==> default: Resolving cookbook dependencies... 
==> default: Fetching 'XXXXXXXXXX' from source at . 
==> default: Using XXXXXXXXXX (1.2.0) from source at . 
==> default: Vendoring XXXXXXXXXX (1.2.0) to /root/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150206-18541-kdy12t-default/XXXXXXXXXX 
==> default: Fixed port collision for 22 => 2222. Now on port 2200. 
==> 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 => 2200 (adapter 1) 
==> default: Booting VM... 
==> default: Waiting for machine to boot. This may take a few minutes... 
    default: SSH address: 127.0.0.1:2200 
    default: SSH username: vagrant 
    default: SSH auth method: private key 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
    default: Warning: Connection timeout. Retrying... 
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. 

If you look above, you should be able to see the error(s) that 
Vagrant had when attempting to connect to the machine. These errors 
are usually good hints as to what may be wrong. 

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. 

UPDATE: 我把我的虛擬機的快照的基礎上,從這個博客的說明:​​

的錯誤我在客戶虛擬機得到:

MP-BIOS bug: 8254 timer not connected to IO-APIC 
kernel panic - not syncing: IO-APIC + timer doesn't work! Boot with apic-debug and send a report. Then try booting with the 'noapic' option. 

pid: 1, comm: swapper Tainted: G W -------- 2.6.32-431.el6.x86_64 #1 
+0

這可能是我的基礎設施的安裝方式。爲了讓它始終如一地工作,我已經轉變了ioapic:'關閉'。 – nimesh 2015-03-12 19:45:20

回答

1

在這裏看看Vagrant stuck connection timeout retrying它應該給你所有你需要的答案。

我建議首先要做的是:

  1. 升級流浪到最新版本,現在它看起來是1.7.2,你正在使用1.6.5。

  2. 添加到您的Vagrantfile

    Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 
    
        config.vm.provider "virtualbox" do |vb| 
        vb.gui = true 
        end 
    
    end 
    

    它將使垂直框,開始您的流浪建立VM在GUI模式。 請確保它正確啓動,並且可以使用用戶名登錄到它:vagrant密碼:vagrant(這應該是您的基本框中設置的標準憑據)。

  3. 然後嘗試從主機系統通過SSH連接到正在運行的VM。使用相同的流浪者/流浪者證件。

  4. 如果2 & 3工作正常,那麼你可以嘗試把它添加到您的Vagrantfile: (你可以離開垂直框先前指定的GUI存在,以及如果你願意的話)

    Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 
    
        config.ssh.username = "vagrant" 
        config.ssh.password = "vagrant" 
    
    end 
    

再次讓您的虛擬機再次流行起來,看看它是否會起作用。

  1. 如果以前的所有步驟都不適用於您,我會審閱上面提供的鏈接中的所有建議。主要在BIOS中啓用VT-x,防火牆關閉Guest VM上的設置。

希望這會有所幫助。我現在也是從流浪漢開始的,並不像我想的那樣容易:)祝你好運!

+0

感謝您的信息。它包含了很多有用的信息,但不幸的是沒有人會爲我工作。 – nimesh 2015-02-11 20:33:08

+0

嗨,所以我明白,從主機系統包括SSH到您的虛擬機的所有步驟都在正常工作,您仍然會收到Connetcion超時錯誤?然後,我連接的帖子中沒有任何指南也不起作用? 不知道這個基地框是從哪裏來的,也許它是錯誤地創建的?你可以嘗試添加到你的Vagrant官方盒子,看看你是否會讓它們工作,即ubuntu/trusty64和/或ubuntu/trusty32。你可以通過發佈'vagrant box add ubuntu/trusty64'來輕鬆完成這個任務,然後嘗試基於這個基礎盒子創建VM,看看它是否適合你? – 2015-02-12 13:03:42

+0

我應該對我之前的評論做更詳細的闡述,我很抱歉。我已經嘗試了您列出的所有步驟。我無法嘗試第2步,因爲我正在測試的環境被鎖定。即使有社區框,我們也遇到同樣的問題。我想弄清楚爲什麼我不能始終如一地提起箱子。在每10到15次成功運行後,我會收到連接超時錯誤..我們甚至安裝了zabbix,以查看當流浪失誤時主機VM中是否內存不足。當他們出錯時,他們平均有大約1.7G的內存空間。 – nimesh 2015-02-16 17:01:59

0

嘗試在不同的門戶網站提供的各種選項之後,最後,我做了一個vagrant destroy 其次vagrant up和它的工作對我來說... :)

相關問題