hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.33k stars 4.44k forks source link

Not able to run Vagrant Up due to Windows and WSL Vagrant version not matched #12678

Open ErKriti opened 2 years ago

ErKriti commented 2 years ago

I installed Vagrant on Windows and WSL then cloned a repo and enabled access to Windows while running export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1" and tried to run Vagrant Up in WSL Ubuntu 18.04 inside the directory where Vagrantfile is present and getting this error.

Vagrant cannot currently enable access to manage machines within the Windows environment because the version of Vagrant installed on Windows does not match this version of Vagrant running within the Windows Subsystem for Linux. Please ensure both installation of Vagrant are the same. If you do not want update your Vagrant installations you can disable Windows access by unsetting the VAGRANT_WSL_ACCESS_WINDOWS_USER environment variable. Windows Vagrant version: unknown Windows Subsystem for Linux Vagrant version: 2.0.2

Env details: Windows 10 Home, linux distro Ubuntu 18.04 using Docker desktop (Not virtual box) via WSL. Also, earlier I had installed latest version on Windows 2.2.19 but later uninstalled and installed 2.0.2 same as WSL then restarted the machine. Please help, thanks.

jmsbooth commented 2 years ago

Having the same issue. Followed the guide here: https://blog.thenets.org/how-to-run-vagrant-on-wsl-2/ Made it to the "Hello world with Vagrant for WSL2" section before throwing this error.

Current installed windows version: 2.2.19 Current installed WSL version: 2.2.9

I suspect that this is a mistake somewhere in the config files and the WSL version should be 2.2.19 as well.

brootware commented 1 year ago

I'm actually facing the same issue too. Has anyone else found a work around on this yet?

zentavr commented 1 month ago

It had been working for me yesterday, but suddenly stopped to work today.

zentavr commented 1 month ago
  1. uninstalled in Windows
  2. uninstalled in WSL
  3. removed .vagrant.d in Windows home dir
  4. removed .vagrant.d in WSL home dir
  5. rebooted
  6. Installed vagrant in WSL (DID NOT INSTALL ANYTHING IN WINDOWS)
  7. run vagrant in WSL