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

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


当前回答

从virtualbox界面,我首先在“CD”上启动,并禁用硬盘启动。因此,它是从CD iso引导的,显然不是在预期的机器上…我希望这能有所帮助。我希望它也能让某人微笑……PEBCAK。

其他回答

我的运行正常,然后这个“警告:远程连接断开。一遍又一遍——大概20遍——直到连接上。基于以上的答案,我只是

vagrant destroy
vagrant up

一切都很好。我的很简单,但我把Vagrantfile压缩到config.vm.box = "ubuntu/trusty64",它还在运行。这就是为什么毁灭然后重新开始似乎是最好的选择。鉴于这些流浪汉图像的无国籍性质,我不明白为什么在每个情况下都不会奏效。我刚刚开始研究这个问题,我可能会发现这不是真的。

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.

我也遇到过同样的问题,但是上面提到的解决方案都不适合我! 我通过将Vagrant降级到1.6.2来解决这个问题,现在它可以工作了!

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

在我从Vagrantfile中删除这一行后,我也遇到了同样的问题:

config.vm.network "private_network", type: "dhcp"

我把这行放回去后,VM加载正常。