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

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


当前回答

如果你不想启用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。

其他回答

关闭虚拟机内部的iptables防火墙

我是这样解决的:

我在我的Vagrantfile中启用了GUI界面(这是配置文件) 我可以在Gui中使用标准用户名vagrant和密码vagrant登录运行中的虚拟机 我关闭了虚拟机内部运行的iptables防火墙

这解决了我的问题,我发现,防火墙阻止了来自本地网络的所有ip,如192.168.x。X和10.x.x.x

添加/etc/iptables规则。D /199-allow-wan允许wan的所有连接:

ip46tables -A wan-input -j ACCEPT

(ip46tables是一个别名)在我的Vagrant例子Freifunk社区中看到这个提交

VMware提供商的用户还有一个可能的解决方案: 对我来说,在同一台主机上删除并行安装的VirtualBox后,这个问题得到了解决。VMware和VirtualBox之间的网络接口明显冲突

如果你不想启用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。

对我来说,这是流浪者和虚拟盒子之间的兼容性。

我在windows 10上,我所做的就是卸载流浪者和虚拟盒子

然后安装一个旧版本的虚拟盒子,特别是4.3.38版本(也为这个版本安装扩展包)

然后安装最新版本的vagrant(目前1.8.5)

从那以后,它起作用了。

需要反复检查的一件事是,您的计算机BIOS中是否启用了硬件虚拟化。

我的问题是相同的超时字符串,但我只能在GUI中看到黑屏。

我刚刚安装的一台笔记本电脑一直显示同样的问题。经过几个小时的搜索,我终于找到了一个提示,看看BIOS是否启用了硬件虚拟化。

以下是我找到的帖子内容:

我发现仍然有一些用户遇到了这个问题。因此,我将尝试在下面总结一些可能的解决SSH超时问题的方法:

Make sure your firewall or antivirus is not blocking the program (which I doubt will happen often) Give your vagrant machine some time for timeouts to happen. If you dont have a very fast PC / Mac, the VM will take while to boot into an SSH ready state, so timeouts will happen. Therefore, first try to let vagrant timeout COMPLETELY before concluding that there is a fault. If vagrant times out completely then increase the timeout limit in the vagrant file to a few min and try again. If that still doesnt work, then try to clean boot your vagrant machine through the VirtualBox interface and enable the GUI of the machine beforehand. If the GUI doesn't show anything happening (ie. just blackscreen, no text) while it is booting, then your vagrant machine has got problems. Destroy the entire machine through the VB interface and reinstall. Delete the ubuntu image files in the Vagrant Images folder in the user folder and redownload and install. Do you even have an intel processor that supports 64bit hardware virtualisation? Google it. If you do, make sure there is no setting in your Bios disabling this feature. Disable hyper-v feature if you are running windows 7 or 8. Google how to disable. Make sure you are running through an SSH enabled client. Use Git bash. Download: http://git-scm.com/downloads Install a 32bit version of ubuntu like trusty32 or precise32. Just change the version in the vagrant file and reinstall vagrant in new directory. Make sure you are using the latest vagrant and virtualbox versions. Last resorts: Format your computer, reinstall windows and buy an intel core isomething processor.

希望这能有所帮助。