我的流浪汉昨晚工作得很好。我刚打开电脑,点击《流浪者》,这就是我得到的:

==> 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 => 2222 (adapter 1)
==> 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: Error: Connection timeout. Retrying...
    default: Error: Connection timeout. Retrying...
    default: Error: Connection timeout. Retrying...
    default: Error: Connection timeout. Retrying...
    default: Error: Connection timeout. Retrying...
    default: Error: Connection timeout. Retrying...
    default: Error: Connection timeout. Retrying...
    default: Error: Connection timeout. Retrying...
    default: Error: Connection timeout. Retrying...
    default: Error: Connection timeout. Retrying...
    default: Error: Connection timeout. Retrying...
    default: Error: Connection timeout. Retrying...
    default: Error: Connection timeout. Retrying...

有人吃过这个吗?vagrant在网络上还没有被广泛报道,我也找不到发生这种情况的原因。


当前回答

我在使用x64盒子(chef/ubuntu-14.04)时也遇到了同样的问题。

我更改为x32,它工作(hashicorp/precise32)。

其他回答

我解决了这个问题,如果其他人有类似的问题,我会回答。

我所做的是:我启用了虚拟框的GUI,让它在启动时等待输入,以选择我是想直接引导到ubuntu还是safemode等等。

要打开GUI,你必须把这个放在你的Vagrantfile配置中:

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

我也遇到过同样的问题。我通过在BIOS设置中启用虚拟化来解决这个问题。

当我杀死腻子过程时,我解决了这个问题。因为我同时运行了git-ssh和putty。他们似乎在争夺ssh访问权。一个就够了。

当你被上面描述的方式困在你的流浪机器上时,不需要以gui模式启动(没有X服务器是不可能的)。

当您的虚拟机正在引导时,在一个单独的终端窗口中,只需找出正在运行的机器的id。

vboxmanage list runningvms

结果是这样的:

"projects_1234567890" {5cxxxx-cxxx-4xxx-8xxx-5xxxxxxxxxx}

通常,VM只是等待您在引导加载程序中选择一个选项。您可以通过controlvm向虚拟机发送相应的keycode(在本例中为Enter):

vboxmanage controlvm projects_1234567890 keyboardputscancode 1c

就是这样。虚拟机将继续启动过程。

It used to help to switch to trusty32, but the situation now got worse again: I tried to use Homestead 2.0 and now I've got the Connection Timeout problem again, which would't usually be a problem, because switching to 32bit helped before. But now I can't just add a line like config.vm.box="ubuntu/trusty32" because we don't have a classic Homestead.yaml file anymore, the values in the new 2.0 Homestead.yaml file just seem to be inserted into the real one in the background and there ist no Vagrantfile available that I could manually edit ...

希望有人能帮忙……