Edited at

Vagrant + Fish + WSL

T.B.D


Environment

$ cat /etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"

$ fish --version
fish, version 2.7.1


Preparation

sudo apt install vagrant

install vbox <= 5.2 from here

check your environment



$ set -U

if you don't find below three universal variables, plese execute following cmds.

$ set -Ux VAGRANT_WSL_WINDOWS_ACCESS_USER_HOME_PATH <your path>

$ set -Ux VAGRANT_WSL_WINDOWS_ACCESS_USER <your name>
$ set -Ux VAGRANT_WSL_ENABLE_WINDOWS_ACCESS 1

Add the path of VBoxManage

$ set -Ux PATH $PATH /mnt/c/Program\ Files/Oracle/VirtualBox/


Execute vagrant

vagrant box add ubuntu/xenial64

vagrant init ubuntu/xenial64

Edit VagrantFile

config.vm.provider "virtualbox" do |vb|

vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ]
end

vagrant up --provider virtualbox


Appendix

If you get following the result, please check if your VT-x is enabled in BIOS.

There was an error while executing `VBoxManage`, a CLI used by Vagrant

for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "66549888-8955-407b-a927-b512e4f2c1f0", "--type", "headless"]

Stderr: VBoxManage.exe: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole


You may need to check if Hyper-V is disabled from the control panel of Windows.