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

==> 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中运行vagrant/VirtualBox时得到了这个。我通过在主机上运行流浪机器来解决这个问题。

其他回答

将ubuntu32位安装到AMD64位上就成功了。我无法访问BIOs,因为它是一个受限制的环境,但我仍然能够让它与ubuntu/trusty32而不是ubuntu/trusty64一起工作

在Windows 7 SP1上使用Vagrant 1.6.3和VirtualBox 4.3.15

希望这能有所帮助。

如果你不想启用GUI,然后不得不禁用它,你也可以从Oracle安装扩展包:

http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html#extpack

然后把这个放在你的Vagrantfile中来启用VRDP:

vb.customize ["modifyvm", :id, "--vrde", "on"]

现在您可以使用RDP按需连接到您的盒子,而不需要运行SSH或一直打开GUI。

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

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

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

我也有同样的问题。我认为问题可能是SSH密钥(错误的文件定位或其他东西,但我检查了很多次),但你可能总是在配置部分添加用户名和密码(不使用SSH密钥)和运行gui,所以Vagrantfile中的代码应该看起来或多或少如下:

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.ssh.username = "vagrant"
  config.ssh.password = "vagrant"

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

In my case even if GUI was displayed I got black screen (no errors or possibility to login or anything else) and in console I got the Error: Connection timeout. Retrying... many times. I made sure I had VT-x (virtualization) enabled in BIOS, I checked many combinations of versions of both Virtual Box and Vagrant together and many Vagrant boxes (for some of them I didn't have black screen in GUI but still have connection problems). Finally I've updated VirtualBox and Vagrant again to the last versions and the problem still occurred.

最关键的是在运行vagrantup(使用Vagrantfile中的GUI)后,在VirtualBox中查看图标,如下图所示

虽然我在VirtualPC中没有错误(没有VT-x未启用的警告),但我的V图标是灰色的,所以这意味着VT-x被禁用。正如我说的,我一直在我的BIOS中启用它。

Finally I realized the problem might by HYPER-V which I also installed and enabled to test sites on older Internet Explorer. I went to Windows Control Panel -> Programs and functions / Software and choose from the menu on left Turn on or Turn off Windows functions (hope you will find those, I use Polish Windows so don't know exact English names). I turned off Hyper-V, restarted PC and after running Virtual Box and vagrant up I finally had no errors, in GUI I have login screen and my V icon stopped to be gray.

我浪费了很多时间来解决这个问题(和许多电脑重启),所以我希望这可能对任何在Windows上有问题的人有帮助-确保你在控制面板中关闭了Hyper-V。