1. 程式人生 > >vagrant up 失敗解決辦法

vagrant up 失敗解決辦法

vagrant up 失敗有如下提示:

E:\vagrantbox\centos65>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos65'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: centos65_default_1467013098683_26652
==> 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) => 2222 (host) (adapter 1)
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.


Command: ["startvm", "4f89ee30-b887-49ae-8605-e8bb198ce4e2", "--type", "headless"]


Stderr: VBoxManage.exe: error: The virtual machine 'centos65_default_1467013098683_26652' has terminated unexpectedly during startup with exit code 1 (0x1).  More details may be available in 'C:\Users\xxxVirtualBox VMs\centos65_default_1467013098683_26652\Logs\VBoxHardening.log'
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine


1、檢視環境變數是否設定正確

右擊桌面“計算機”→【屬性】→ 【高階系統設定】→【環境變數】

2、直接使用VirtualBox開啟一個vm也會失敗,基本上可以確定是VirtualBox版本的問題

有遇到過安裝了VirtualBox-5.0.22-108108-Win.exe的版本在win7下用不了,解除安裝重灌VirtualBox-4.3.12-93733-Win.exe之後可用。