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

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


当前回答

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

希望有人能帮忙……

其他回答

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

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

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

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

在我的情况下,给它一个静态IP地址,简单地解决了问题:

Config.vm.network "private_network", ip: "192.168.50.50"

有这个问题超过一个星期,尝试了所有的解决方案,

1. giving SSH username and password
2. Enabling GUI interface
3. Updated Virtual Box and Vagrant

毫无效果。

终于从这个环节得到了解决方案

将谷歌公共DNS IP添加到您的Wifi设置中

在Network Preferences下面> Wifi > Advanced > DNS add IP Address 8.8.8.8

完美的工作。也许这可以帮助任何在Mac上有问题的人。 由于Skovmand

删除文件:

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

然后运行:

vagrant up

我是这样做的:

“vagrant up”启动虚拟机后,关闭虚拟机,在虚拟框中进入新的虚拟机设置。然后点击“网络”->“高级” 适配器类型:我从“英特尔PRO XXXXX”改为“PCNet-Fast”(或任何其他适配器除了英特尔PRO确实工作)