vagrant + virtualbox等待机器启动时超时

对不起,我真的很陌生我运行stream浪1.4.3和virtualbox 4.3.26。 而我的主机操作系统是Ubuntu 14.04.2。

我是一个PHP开发人员,我试图让我的开发环境准备好几个项目。

每个我从vagrantbox.es试试我都会遇到同样的错误。 和错误是:

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. This can mean a number of things. 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. 

我已经看过相同的问题,我试过了

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

添加这些行后,我在我的盒子里获得login页面,所以它启动,我可以在GUI界面中运行我的命令。 但令人惊讶的是我得到同样的错误。 我想也许是因为客户操作系统无法login,我把这些线添加到我的stream浪文件

 config.ssh.username = "vagrant" config.ssh.password = "vagrant" config.ssh.insert_key = "true" 

但我得到这个错误

 There are errors in the configuration of this machine. Please fix the following errors and try again: SSH: * The following settings shouldn't exist: insert_key, password 

实际上我被搞砸了,我不知道该怎么办。

进入虚拟框并停止运行连接。 点击开始,等待用户登录并通过:vagrant。 在里面写这个命令:

 sudo vim /etc/systemd/system/network-online.targets.wants/networking.service 

并在文件结尾处更改以下行:

 TimeoutStartSec=5min 

至:

 TimeoutStartSec=30sec 

然后我重新启动系统,它工作正常。

我升级了我的流浪者到1.7.2,现在我的问题已经解决了。 但我没有看到我的箱子在virtualbox界面中运行。 毕竟我现在可以ssh到我的盒子,没有任何问题。