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

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


当前回答

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.

其他回答

如果您正在使用包装层(如Kitchen CI),并且正在运行32b主机,则必须抢先安装Vagrant盒子。它们的默认提供程序是二进制文件的opscode“家族”。

所以在厨房创建default-ubuntu-1204之前,请确保您使用:

vagrant box add default-ubuntu-1204 http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04-i386_chef-provisionerless.box

如果您的主机不支持字大小虚拟化,则使用32b映像

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

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

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

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

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

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

希望这能有所帮助。

对我来说有用的是从BIOS允许64位操作系统(Ubuntu 13.10)上的64位虚拟化。