$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2200 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.
If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.
The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.
vargant up啟動(dòng)的時(shí)候遇到上述報(bào)錯(cuò),無法啟動(dòng)虛擬機(jī)筒捺。
報(bào)錯(cuò)了咋辦呢司浪,按照提示去解決唄……
Valid states are 'starting, running'. The machine is in the 'poweroff' state.
If the provider you're using has a GUI that comes with it, it is often helpful to open that and watch the machine微饥。
The primary issue for this error is that the provider you're using is not properly configured. This
VirtualBox是Vagrant默認(rèn)的Provider遂庄,提示信息是讓打開Vagrant的GUI排查看看,為啥虛擬機(jī)一直處于‘關(guān)機(jī)狀態(tài)’塔拳。原因八九成就是VirtualBox設(shè)置不正確鼠证。
那就打開VirtualBox唄,找到對(duì)應(yīng)的虛擬機(jī)靠抑,在GUI界面上點(diǎn)啟動(dòng)看看量九。
點(diǎn)啟動(dòng),看到上述警告颂碧,出了個(gè)警告娩鹉,說沒有找到USB 2.0控制器,以及2個(gè)解決問題的方法(據(jù)說USB 2.0組件不開源稚伍,所以必須從完全開源的VirtualBox主體中分離):
- 安裝‘Oracle VM VirtualBox Extension Pack’
- 在虛擬機(jī)設(shè)置中禁用USB 2.0 (只能用USB 1.1)
這就好辦了,這里我使用的是第二種方法戚宦。找到
再回到終端个曙,執(zhí)行 vagrant up,發(fā)現(xiàn)ok了受楼。