So I followed the guide on https://www.vagrantup.com/docs/other/wsl.html which seems fairly straight forward. I'm using Virtualbox on the Windows Host. I've got Vagrant 2.1.5 installed both in the WSL Debian environment as well as the Windows environment. I've exported VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1" in the Linux env and made sure that VBoxManage.exe is in the PATH of that environment as well.
Vagrant in Windows works as one would expect. Executing Vagrant on Linux doesn't find the VBoxManage.exe executable, even though it's in the path. In WSL I'm using /c/Users/lukas as my home directory, so that I have a shared Linux/Windows home dir. I have metadata turned on and root = / in /etc/wsl.conf (which is why the path is /c/ instead of the /mnt/c/ default) so that Linux permissions are carried over to the NTFS filesystem. In ~/test/ (which is /c/Users/lukas/test/ or C:\Users\lukas\test) I have a default Vagrantfile with a centos/7 box. VBoxManage.exe is in my PATH: lukas@bigmac:~/test$ which VBoxManage.exe /c/Program Files/Oracle/VirtualBox/VBoxManage.exe However vagrant up will result in lukas@bigmac:~/test$ vagrant up No usable default provider could be found for your system. Vagrant relies on interactions with 3rd party systems, known as "providers", to provide Vagrant with resources to run development environments. Examples are VirtualBox, VMware, Hyper-V. The easiest solution to this message is to install VirtualBox, which is available for free on all major platforms. If you believe you already have a provider available, make sure it is properly installed and configured. You can see more details about why a particular provider isn't working by forcing usage with `vagrant up --provider=PROVIDER`, which should give you a more specific error message for that particular provider. I can however use vagrant.exe up and it'll work just fine lukas@bigmac:~/test$ vagrant.exe up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'centos/7'... ==> default: Matching MAC address for NAT networking... ==> default: Checking if box 'centos/7' is up to date... ==> default: Setting the name of the VM: test_default_1539801180834_58779 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... default: No guest additions were detected on the base box for this VM! Guest default: additions are required for forwarded ports, shared folders, host only default: networking, and more. If SSH fails on this machine, please install default: the guest additions and repackage the box to continue. default: default: This is not an error message; everything may continue to work properly, default: in which case you may ignore this message. ==> default: Rsyncing folder: /cygdrive/c/Users/lukas/test/ => /vagrant lukas@bigmac:~/test$ However using vagrant.exe instead of the Linux vagrant binary obviously means that the permissions for the ssh key are Windows defaults i.e. world readable. Any idea what else I'd have to change other than setting that VAGRANT_WSL_ENABLE_WINDOWS_ACCESS environment variable to make Linux Vagrant detect VBoxManage.exe from the Windows environment? Thanks, -- Lukas -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/8c42e4a0-1c5e-4e81-9bcf-d349dcbeb338%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.