【发布时间】:2017-03-16 01:20:34
【问题描述】:
我在 Core i3 上使用 Ubuntu 15.10 64 位。我已经安装了 Vagrant 1.8.1 和 VirtualBox。
我做了以下事情:
$ vagrant box add ubuntu/trusty32
$ vagrant init ubuntu/trusty32
$ vagrant up
在执行vagrant up 之后,我收到如下所示的错误。如果我打开 VirtualBox,我可以看到系统已经启动并等待用户名和密码。
注意:让hashicorp/precise32 在 Vagrant 中运行没有任何问题。我只有ubuntu/trusty32 有问题。
~/vagrant$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty32'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty32' is up to date...
==> default: Setting the name of the VM: vagrant_default_1459678892518_13508
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (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
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
我又给了$ vagrant up,这就是我得到的
~/vagrant$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty32' is up to date...
==> default: VirtualBox VM is already running.
我也尝试了$ vagrant ssh,得到了以下结果。
~/vagrant$ vagrant ssh
ssh_exchange_identification: read: Connection reset by peer
这是我的Vagrantfile
谁能告诉我这是什么问题?
【问题讨论】:
-
请发布您的
Vagrantfile- 您在$ vagrant init ubuntu/trusty32之后修改了吗? -
没有。我没有改变它的任何东西。 Vagrantfile 是使用 init 命令生成的。