Published on: 29.12.2019
I am a fan of CLI packet managers (because they save me time).
On Windows Chocolatey
is the only option, so I tried to install Vagrant with VirtualBox as hypervisor with it.
How difficult can it be?
More then I expected.
Instalment of Vagrant and VirtualBox look easy:
1 2 3 |
choco install vagrant choco install virtualbox |
Init and up:
1 2 3 |
vagrant init bento/centos-7.4 vangarant up |
Have we have first problems:
1 2 3 4 5 6 7 |
C:\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. |
After googling, one possible solution is to set the provider explicitly, not a big problem, altho I like when tech just works.
Try again:
1 2 |
C:\vagrant up --provider virtualbox |
Then next again the problem:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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 the latest version. |
Try my luck with older version 6.0 of VirtualBox:
1 2 3 |
choco uninstall virtualbox choco install virtualbox --version 6.0 |
Let try again:
1 2 |
C:\vagrant up |
Finally working.
1 2 |
Bringing machine 'default' up with 'virtualbox' provider... |
As you can see now just vagrant up is working without the need to set provider.