有一些问题让我的流浪汉站起来,
拿到箱子就跑vagrant init
之后vagrant up
命令我收到此消息。
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,这可能会提供有关问题的更好线索。
要启用 GUI 模式,请确保此部分位于您的Vagrantfile
未注释:
config.vm.provider "virtualbox" do |vb|
vb.gui = true
end
然后做一个vagrant reload
。这应该会打开 VirtualBox 应用程序,显示您的虚拟机 UI。通常问题会变得明显,无论是网络问题还是 grub 引导加载程序问题。
解决问题后,您可以再次将此注释掉,然后再执行另一个vagrant reload
返回无头模式。
参考:流浪文档 http://docs.vagrantup.com/v2/virtualbox/configuration.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)