【问题标题】:Vagrant box: default: Warning: Connection timeout. RetryingVagrant 框:默认值:警告:连接超时。重试
【发布时间】:2014-08-26 08:32:06
【问题描述】:

我无法让 vagrant box 运行。我在这个线程中尝试了解决方案:Vagrant stuck connection timeout retrying。那里没有运气。我还尝试增加 config.vm.boot_timeout 的值。也没有运气。请帮忙!

$ vagrant destroy && vagrant up
    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'shell' provisioner...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'laravel/homestead'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Setting the name of the VM: Homestead_default_1404542131789_93737
==> 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: 80 => 9000 (adapter 1)
    default: 3306 => 33060 (adapter 1)
    default: 5432 => 54320 (adapter 1)
    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...
    default: SSH address: 127.0.0.1:2222
    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.

提前致谢!

【问题讨论】:

  • stackoverflow.com/questions/22575261/… 在这个问题中,第二个答案对我有用。
  • 这种情况可能是因为 VirtualBox 未能重定向端口,尽管说 '==> default: Forwarding ports... default: 22 => 2222 (adapter 1) ' 您可以在我的问题link 中查看完整描述。我仍然不知道如何修复重定向失败(请在我的帖子中添加注释,如果以及如何成功!

标签: laravel-4 connection localhost vagrant vagrantfile


【解决方案1】:

您需要在 BIOS 中启用虚拟机选项才能使 VirtualBox 按预期工作。

虚拟化设置:http://www.sysprobs.com/disable-enable-virtualization-technology-bios

【讨论】:

    【解决方案2】:

    您在此处发布的消息几乎是在 VM 启动结束时打印出来的。

    所以,在我看来,有两个主要原因

    1. 您有防火墙,因此即使从本地主机也无法访问 vagrant 机器。我会尝试禁用防火墙并再次运行。

    2. 您的客户机太重了,在启动时会发生很多事情,在它真正可用之前,所以 vagrant 会超时。在这种情况下,请按照 vagrant 的说明更新 vm 配置文件中 config.vm.boot_timeout 的值。

    希望对你有帮助

    【讨论】:

      【解决方案3】:

      在您的 vagrant 配置文件中启用键盘的 gui 输入

      config.vm.provider :virtualbox do |vb|
        vb.gui = true
      end
      

      【讨论】:

        猜你喜欢
        • 2017-10-08
        • 2015-03-28
        • 2016-03-24
        • 1970-01-01
        • 1970-01-01
        • 2016-02-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多