2015-02-06 82 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和它的工作对我来说... :)

相关问题