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

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

希望有人能帮忙……

其他回答

对我有帮助的是在BIOS中启用虚拟化,因为机器无法启动。

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

我是这样做的:

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

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

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

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

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

我在《Vagrant 1.6.5》和《Virtual Box 4.3.16》中也遇到了同样的问题。 在https://github.com/mitchellh/vagrant/issues/4470上描述的解决方案对我来说很好,我只需要删除VirtualBox 4.3.16并安装旧版本4.3.12。