SSH连接到流浪者家园的盒子超时

SSH连接到流浪者家园的盒子超时,ssh,vagrant,virtualbox,Ssh,Vagrant,Virtualbox,我正在学习如何使用Laravel 4.2,它可以随时使用Homestead。我以前使用Apache在本地学习Laravel。当我用电脑建立家园时,我总是遇到一个超时 我使用的是Vagrant 1.6.3,Homestead的最新版本(截至2014年7月10日),PHP 5.5.3(我想这不重要,因为我使用的是Vagrant?),以及Laravel 4.2 我使用以下Vagrantfile: VAGRANTFILE_API_VERSION = "2" path = "#{File.dirname

我正在学习如何使用Laravel 4.2,它可以随时使用Homestead。我以前使用Apache在本地学习Laravel。当我用电脑建立家园时,我总是遇到一个超时

我使用的是Vagrant 1.6.3,Homestead的最新版本(截至2014年7月10日),PHP 5.5.3(我想这不重要,因为我使用的是Vagrant?),以及Laravel 4.2

我使用以下
Vagrantfile

VAGRANTFILE_API_VERSION = "2"

path = "#{File.dirname(__FILE__)}"

require 'yaml'
require path + '/scripts/homestead.rb'

Vagrant.configure("1") do |config|
  config.vm.boot_mode = :gui
end
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  Homestead.configure(config, YAML::load(File.read(path + '/Homestead.yaml')))
end
我使用以下
宅地.yaml

---
ip: "192.168.10.10"
memory: 2048
cpus: 1

authorize: /home/alex/.ssh/id_rsa.pub

keys:
    - /home/alex/.ssh/id_rsa

folders:
    - map: /home/alex/repos/www
      to: /home/vagrant/repos/www

sites:
    - map: homestead.app
      to: /home/vagrant/repos/www/learning/public
我的
/etc/hosts
文件包含以下行:

127.0.0.1   learning.app
当我调用Wagrant up时,我收到以下输出:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> 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 => 8000 (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...
[[17 more failed attempts]]
    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.

我以前的Apache设置会干扰吗?我错过什么了吗?谢谢。

打开VirtualBox GUI,您将能够更好地看到导致问题的原因。以下是关于如何以两种方式执行此操作的一些说明(您需要在Vagrant文件或homestead.rb文件中执行此操作):

这将允许您看到实际的引导屏幕并观察它的运行


你是在linux主机上运行Vagrant吗?

我遇到了同样的问题“超时…”,直到我发现我的计算机的BIOS中禁用了虚拟化兼容性。 来源:这是佛洛姆


修复了它工作得很好的问题。

您是否尝试过通过vbox gui手动启动该设备,然后通过普通shell连接到它?这是我第一次使用VirtualBox进行实时操作。如何从GUI运行Homestead box?编辑:我打开VirtualBox GUI,看到我有几个宅地盒子,并试图打开一个。它只是显示了一个黑屏(现在超过五分钟)。可能是@kenorb的重复,可能不是重复,因为解决方案完全不同。是的,我正在运行Debian衍生工具(Xubuntu 13.04)。我尝试了这个解决方案。您现在可以在原始帖子中看到我的
Vagrantfile
,其中包含链接建议的更改。我没有看到任何不同,输出是相同的。有趣。我只是添加了配置,就像你做的一样,一旦我做了“漫游”,gui窗口就会弹出。现在,我确实不得不先“游手好闲地阻止”虚拟机暂停运行。我也在OSX而不是Linux上运行,所以不确定这是否会使它有所不同。您可以尝试打开VirtualBox Manager应用程序,看看它是否允许您从那里调出gui窗口?是的,我的Intel CPU中的虚拟化已禁用。流浪者/宅地现在工作得很好!我在回来查看问题之前找到了这个链接:哦!这看起来比我建议的佛洛姆更完整。塔恩克斯。