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

==> 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在网络上还没有被广泛报道,我也找不到发生这种情况的原因。


当前回答

检查CPU在BIOS设置中的虚拟化是否已启用。

其他回答

这是流浪者的新“特征”。看看这里: https://github.com/mitchellh/vagrant/issues/3329

他们将把“错误”改为“警告”。它只是告诉你机器还没有启动,它正在尝试连接…

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 ...

希望有人能帮忙……

我有一个问题与现有的盒子(不确定什么改变),但我可以通过SSH连接,即使流浪者盒子无法启动。碰巧我的SSH密钥以某种方式改变了。

从vagrant根文件夹中,我运行vagrant ssh-config,它告诉我密钥文件在哪里。我用puttygen打开它,它给了我一把新钥匙。

在我的Linux客户机上,我编辑了~/。Ssh /authorized_keys并将新的公钥放入其中。

现在一切都恢复正常了!

就像有些人已经指出的那样,如果VirtualBox映像没有正确引导,就会出现错误。对我来说,在《Vagrant》中使用GUI模式并没有太大帮助,因为它只显示一个黑色窗口。在virtualbox GUI中,我检查了虚拟机的设置,发现操作系统设置不正确(Debian 32而不是64位)。

所以我只能建议手动检查虚拟机的VirtualBox设置,让虚拟机启动,而不是首先使用Vagrant。

VMware提供商的用户还有一个可能的解决方案: 对我来说,在同一台主机上删除并行安装的VirtualBox后,这个问题得到了解决。VMware和VirtualBox之间的网络接口明显冲突