1. 程式人生 > 實用技巧 >Vagrant安裝啟動linux,VitrtualBox,Centos7

Vagrant安裝啟動linux,VitrtualBox,Centos7

錯誤原因:virtualbox版本與vagrant版本不對應,無法預設以virtualbox啟動,導致用hyperv啟動(開啟hyperv也沒用,會導致找不到離線下載的box),強制用virtualbox啟動需要加上 --provider=virtualbox,加上後提示版本錯誤不對應,並且提示了可用版本。
Bringing machine 'default' up with 'hyperv' provider... ==> default: Verifying Hyper-V is enabled... The Hyper-V cmdlets for PowerShell are not available! Vagrant requires these to control Hyper-V. Please enable them in the "Windows Features" control panel and try again.

`PS D:\vagrant\test> vagrant up
Bringing machine 'default' up with 'hyperv' provider...
==> default: Verifying Hyper-V is enabled...
The Hyper-V cmdlets for PowerShell are not available! Vagrant
requires these to control Hyper-V. Please enable them in the
"Windows Features" control panel and try again.

PS D:\vagrant\test> vagrant up --provider=virtualbox
The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:

Vagrant has detected that you have a version of VirtualBox installed
that is not supported by this version of Vagrant. Please install one of
the supported versions listed below to use Vagrant:

4.0, 4.1, 4.2, 4.3, 5.0, 5.1, 5.2, 6.0

A Vagrant update may also be available that adds support for the version
you specified. Please check www.vagrantup.com/downloads.html to download`