簡體   English   中英

vagrant + virtualbox等待機器啟動時超時

[英]vagrant + virtualbox Timed out while waiting for the machine to boot

對不起,我真的是流浪漢的新手我正在運行vagrant 1.4.3和virtualbox 4.3.26。 我的主機操作系統是ubuntu 14.04.2。

我是一名php開發人員,我正在努力讓我的開發環境為幾個項目做好准備。

我從vagrantbox.es嘗試的每一個盒子我在運行vagrant up命令時遇到同樣的錯誤。 而錯誤是:

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

添加這些行后,我在我的框中獲取登錄頁面,以便啟動,我可以在GUI界面中運行我的命令。 但令人驚訝的是我得到同樣的錯誤。 我認為可能是因為客戶操作系統無法登錄,我將這些行添加到我的流浪文件中

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到我的盒子,沒有問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM