To avoid unnecessary risks and for testin purposes, following Vagrant recommendations, I preferred to temporarily disable Hyper-V if you had enabled it, and forget about the battles of the hypervisors:
1 Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
2.Installing Windows Subsystem for Linux (WSL)
This topic is pretty easy, only had to go to the Microsoft Store on Windows 10, and look for Ubuntu App.
If you face any issue or want to know more info about this process, have a look at this link: https://msdn.microsoft.com/en-us/commandline/wsl/install_guide
Just download it from VirtualBox site and install it as usually
1 sudo apt install vagrant
Verifying Vagrant is installed correctly:
1 vagrant --version
5.Finishing last settings
This is absolutely necessary to avoid errors, you can add it to .bashrc if you prefers
1 export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
Vagrantfile has to contain one line to avoid error related to Stderr, so including here how to download first image or box example to adjust related
1 2 3 4 5 6 7 # Add new box vagrant box add ubuntu/bionic64 # Make project folder and modifying Vagranfile mkdir vagrant cd vagrant vagrant init ubuntu/bionic64
5.3Setting up Vagrantfile
As VirtualBox installed is Windows based, it’s necessary to share a folder for using by vagrant (WSL) and VirtualBox (Windows).
In my case, I drop it under
c:\vagrant, so I moved
Vagrantfile to this folder once created and modified it accordingly:
1 2 cp Vagrantfile /mnt/c/vagrant cd /mnt/c/vagrant
Following lines were modified/added:
1 config.vm.synced_folder "../data", /mnt/c/vagrant"
1 2 3 config.vm.provider "virtualbox" do |vb| vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ] end
6.Running the box
Last and not least, this line to finish all good job done
1 vagrant up