流浪超时 [英] Vagrant up timeout

查看:26
本文介绍了流浪超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一些问题让我的流浪汉起床,拿到盒子,运行 vagrant init,在 vagrant up 命令后我收到这条消息.

Having some issues to get my vagrant up, Got the box, run vagrant init and after vagrant up command I get this message.

Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Importing base box 'precise32'...
    ==> default: Matching MAC address for NAT networking...
    ==> default: Setting the name of the VM: virtm_default_1400193131859_61200
    ==> default: Fixed port collision for 22 => 2222. Now on port 2201.
    ==> default: Clearing any previously set network interfaces...
    ==> default: Preparing network interfaces based on configuration...
        default: Adapter 1: nat
    ==> default: Forwarding ports...
        default: 22 => 2201 (adapter 1)
    ==> default: Booting VM...
    ==> default: Waiting for machine to boot. This may take a few minutes...
        default: SSH address: 127.0.0.1:2201
        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.

有什么建议吗?

推荐答案

有几个不同的问题会导致这个超时问题.跟踪它的一个好技巧是启用 GUI 模式.这将显示 VirtualBox 机器 UI,这可能会提供有关问题的更好线索.

There are several different problems which can lead to this timeout problem. A good tip for tracking it down is to enable the GUI mode. This will bring up the VirtualBox machine UI which may provide a better clue as to the problem.

要启用 GUI 模式,请确保您的 Vagrantfile 中的此部分未注释:

To enable GUI mode, make sure this section in your Vagrantfile is uncommented:

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

然后执行vagrant reload.这应该会打开 VirtualBox 应用程序,显示您的虚拟机 UI.通常问题会变得很明显,无论是网络问题还是 grub 引导加载程序问题.

Then do a vagrant reload. This should bring up the VirtualBox application showing your virtual machine UI. Usually the problem will become apparent, whether it's a network issue or grub boot loader problem.

解决问题后,您可以再次注释掉,然后再执行一次 vagrant reload 以返回无头模式.

After fixing the issue, you can comment this out again, then do another vagrant reload to return to headless mode.

参考:Vagrant 文档

这篇关于流浪超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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