在无所事事的情况下等待机器启动时超时 [英] Timed out while waiting for the machine to boot when vagrant up

查看:1140
本文介绍了在无所事事的情况下等待机器启动时超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Ubuntu 13.10,我安装了Vagrant 1.5.4和VirtualBox 4.3.10r93012.我第一次在虚拟机上正确编写脚本时,写命令vagrant up时会出现我的问题.但是在执行vagrant halt并再次写入命令vagrant up之后,会出现问题:

I have an Ubuntu 13.10 and I installed Vagrant 1.5.4 and VirtualBox 4.3.10r93012. My problem occurs when I write the command vagrant up at the first time the script up the virtual machine correctly. But after doing vagrant halt and write the command vagrant up again, a problem occurs:

vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> 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: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
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.

有什么解决办法吗?谢谢.

Is there any solution? Thanks.

推荐答案

我使用config.vm.boot_timeout增加了时间.但是对我来说,这不是原因,尽管错误告诉您超时.

I increase the time using config.vm.boot_timeout. But for me it was not the reason although the error tells about a timeout.

我使用vim打开了Vagrantfile,并添加了以下几行以打开VM的GUI.

I opened the Vagrantfile using vim and add the following lines which turns on GUI for the VM.

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

重新运行vagrant up之后,我在GUI中看到了真正的原因.有一个错误对话框,它一直在等待.这就是连接超时的原因.

After re-running the vagrant up i saw the real reason in the GUI. There was an error dialog and it keeps waiting. That was the reason for the connection timeout.

要解决此问题,我必须在系统BIOS中进行一些配置.我必须打开英特尔VT-x设置.并且请同时检查AMD-V设置.这些设置有助于硬件虚拟化.

To fix this i had to do some configurations in the system BIOS. I had to turn on the intel VT-x setting. And please check for AMD-V setting as well. These settings help hardware virtualization.

这篇关于在无所事事的情况下等待机器启动时超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆