9

我无法让 vagrant box 运行。我在这个线程中尝试了解决方案:Vagrant 卡住了连接超时重试。那里没有运气。我还尝试增加 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.

提前致谢!

4

3 回答 3

3

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

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

于 2014-12-24T21:23:21.890 回答
0

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

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

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

  2. 您的客户机太重了,在启动时会发生很多事情,在它真正可用之前,所以 vagrant 会超时。在这种情况下,更新 vm 配置文件中config.vm.boot_timeout的值,就像 vagrant 友好的状态一样。

希望这可以帮助

于 2014-07-05T07:06:27.350 回答
-1

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

config.vm.provider :virtualbox do |vb|
  vb.gui = true
end
于 2015-01-08T14:17:12.013 回答