Vagrant box:默认值:警告:连接超时。重试

时间:2014-07-05 06:52:48

标签: laravel-4 connection localhost vagrant vagrantfile

我无法让流浪盒运转。我在这个帖子中尝试了解决方案: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.

提前致谢!

3 个答案:

答案 0 :(得分:3)

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

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

答案 1 :(得分:0)

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

因此,正如我所看到的,这有两个主要原因

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

  2. 您的来宾机器很重,很多事情都是在启动时发生的,然后实际可用,因此流浪汉会超时。在这种情况下,请更新vm配置文件中 config.vm.boot_timeout 的值,如流浪者所说。

  3. 希望这有帮助

答案 2 :(得分:-1)

在您的流浪汉配置文件中启用键盘的gui输入

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