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

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


当前回答

删除文件:

C:\Users\UserName\\.vagrant.d\insecure_private_key

然后运行:

vagrant up

其他回答

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

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

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

现在一切都恢复正常了!

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

希望有人能帮忙……

我发现在MacOS上使用VirtualBox将此添加到Vagrantfile将让你更进一步:

config.vm.provider 'virtualbox' do |vb|
  vb.customize ['modifyvm', :id, '--cableconnected1', 'on']
end

也许这是一个太简单的答案,以帮助许多人,但值得一试,如果你没有:做一个“流浪者暂停”,而不是“流浪者暂停”,然后重新启动VM与“流浪者up”。

我认为我的问题是由于一些“kworker”进程出现bug,并且在VM中不断超时,所以做硬重启似乎正确地重新加载进程,而保存和恢复只是在其破碎状态下恢复破碎的进程。

我在一台Windows 8.1的机器上遇到了同样的问题。连接超时和启用gui根本没有用,屏幕是黑色的。在我的情况下,修复是禁用“超V”

引用自Vagrant文档https://docs.vagrantup.com/v2/hyperv/index.html

警告:启用Hyper-V将导致VirtualBox、VMware和任何其他虚拟化技术不再工作。请参阅这篇博客文章https://www.hanselman.com/blog/SwitchEasilyBetweenVirtualBoxAndHyperVWithABCDEditBootEntryInWindows81.aspx,如果有需要其他管理程序的时候,可以简单地创建一个引导条目来启动没有启用Hyper-V的Windows。