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

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


当前回答

就我个人而言,Tunnelblick VPN软件阻断了连接。现在当我启动新的虚拟机时,我临时禁用Tunnelblick。

其他回答

我找到的解决方案是检查连接到NAT的适配器1中的电缆连接选项。我真的不知道,这是我的第四个流浪者盒子,但这是唯一一个没有选中电缆连接选项的盒子,检查它后,它工作了。

删除文件:

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

然后运行:

vagrant up

这里有很多很好的答案,我不能全部读完,但是,我只是来给我的一点贡献。我有两个不同的问题:

vagrant up wasn't able to find my ssh 'id_rsa' (because I didn't have it yet, at that time): I ran ssh-keygen -t rsa -b 4096 -C "myemailaddress@mydomain.com", based on this GitHub's article, and voilá, steped through that; Then, I got the same problem of this question "Warning: Connection timed out. Retrying...", eternally...: So, after reading a lot, I've restarted my system and looked at my BIOS (F2 to get there, on PC), and there were Virtualization disabled. I've enabled that, saved, and started the system once again, to check if it has changed anything.

从那以后,流浪起来就像有魔力一样!现在是凌晨4点,但它还在跑!多酷啊,hã?我知道很少有像我这样的受虐狂开发者会在Windows上尝试这个,特别是在Windows 10上,我只是无法不忘记来这里并留下我的话…另一个重要的信息,是,我试图设置Laravel 5,使用Homestead, VirtualBox,作曲家等。这是有效的。所以,希望这个答案能对你有所帮助,就像这个问题和答案对我有所帮助一样。祝福你。G-bye !

FWIW—我的问题是由于使用了一个非常旧的配置文件而不是一个新的配置文件。使用新的配置文件(从而调整/改变DSL)立即解决了我的问题。

My solution turned out to be none of the above exactly. I'm running Ubuntu 14 as guest inside a Windows 7 host. I had been running this vagrant box fine, but I started it up again after not using it for a couple of months, and it kept coming up with the SSH connection timeout. It turned out that somehow the key pair didn't work - so I copied the Vagrant public key into Ubuntu according to the instructions on this page. But that wasn't all. I then discovered that the private key in my base box was different than the private key here. Putting this private key in as the vagrant_private_key file in C:\Users\your-user.vagrant.d\boxes\vagrant-box-name\nnnnnnnn\virtualbox after placing the public key into Ubuntu fixed the problem.