我想提的是,我确实看了看大多数,如果不是所有的流浪者“等待虚拟机启动”故障排除线程前言这个问题在:流浪坚持“等待VM启动”
事情我已经试过包括:
https://superuser.com/questions/342473/vagrant-ssh-fails-with-virtualbox
http://scotch.io/tutorials/get-vagrant-up-and-running-in-no-time
多。
下面是如何设置我的流浪:
注:我们正在使用1.2.2流浪汉,因为我们目前没有足够的时间来改变CONFIGS到更新的版本。我也使用VirtualBox 4.2.26。
- 我的办公室有一个
/official/
文件夹,其中包含诸如Vagrantfile
之类的东西。在我的Vagrantfile
是这些自定义设置:
config.vm.box = "my_box" config.ssh.private_key_path = "~/.ssh/github_rsa" config.ssh.forward_agent = true config.ssh.forward_x11 = true config.ssh.max_tries = 300 config.vm.provision :shell, :inline => "/etc/init.d/networking restart"
我通过
vagrant box add my_box absolute_path/package.box
这非常顺利安装了我们的自定义文件夹(称为package.box
)。运行
vagrant up
,我会看VirtualBox的“预览”,它会被卡在登录页面。我的终端也只会说:Waiting for VM to boot. This can take a few minutes.
据我所知,这是一个SSH问题。或者我的私钥问题,尽管在我的Vagrantfile
中我明确指出了我的私钥位置。VirtualBox的GUI内运行
dhclient
,它说,命令没有找到。运行sudo dhclient eth0
是建议的修复之一。此修复程序:的“修改
/etc/rc.local
文件以包括线sh /etc/init.d/networking restart
只是exit 0
之前” https://superuser.com/a/343775/298915没有解决这个问题。
有趣的注解:
结论:
尝试过重新安装一切想我搞砸了一个文件,它似乎没有改善的问题。我无法处理这个问题。有人能给我一些见解吗?
感谢您分享解决方案。刚刚救了我一堆时间。在我的情况下需要注意的一点是:第一次我跑'vagrant reload'时,仍然在第一步中被挂断。我手动关闭VirtualBox GUI中的VM,然后'vagrant reload'工作。不知道为什么。 – jchung 2015-09-25 05:32:04