{"record":{"id":"0007a0a7feee0bc3","repo":"hashicorp/vagrant","slug":"vagrant-cannot-currently-enable-access-to-manage-m","errorCode":null,"errorMessage":"Vagrant cannot currently enable access to manage machines within the Windows\nenvironment because the version of Vagrant installed on Windows does not\nmatch this version of Vagrant running within the Windows Subsystem for Linux.\nPlease ensure both installation of Vagrant are the same. If you do not want\nupdate your Vagrant installations you can disable Windows access by unsetting\nthe `VAGRANT_WSL_ACCESS_WINDOWS_USER` environment variable.\n\n  Windows Vagrant version: %{windows_version}\n  Windows Subsystem for Linux Vagrant version: %{wsl_version}","messagePattern":"Vagrant cannot currently enable access to manage machines within the Windows\nenvironment because the version of Vagrant installed on Windows does not\nmatch this version of Vagrant running within the Windows Subsystem for Linux\\.\nPlease ensure both installation of Vagrant are the same\\. If you do not want\nupdate your Vagrant installations you can disable Windows access by unsetting\nthe `VAGRANT_WSL_ACCESS_WINDOWS_USER` environment variable\\.\n\n  Windows Vagrant version: %\\{windows_version\\}\n  Windows Subsystem for Linux Vagrant version: %\\{wsl_version\\}","errorType":"exception","errorClass":"Vagrant::Errors::WSLVagrantVersionMismatch","httpStatus":null,"severity":"error","filePath":"lib/vagrant/util/platform.rb","lineNumber":708,"sourceCode":"          end\n          @_wsl_windows_appdata_local\n        end\n\n        # Confirm Vagrant versions installed within the WSL and the Windows system\n        # are the same. Raise error if they do not match.\n        def wsl_validate_matching_vagrant_versions!\n          valid = false\n          if Util::Which.which(\"vagrant.exe\")\n            result = Util::Subprocess.execute(\"vagrant.exe\", \"--version\")\n            if result.exit_code == 0\n              windows_version = result.stdout.match(/Vagrant (?<version>[\\w.-]+)/)\n              if windows_version\n                windows_version = windows_version[:version].strip\n                valid = windows_version == Vagrant::VERSION\n              end\n            end\n            if !valid\n              raise Vagrant::Errors::WSLVagrantVersionMismatch,\n                wsl_version: Vagrant::VERSION,\n                windows_version: windows_version || \"unknown\"\n            end\n          end\n        end\n\n        # systemd is in use\n        def systemd?\n          if !defined?(@_systemd)\n            if !windows?\n              result = Vagrant::Util::Subprocess.execute(\"ps\", \"-o\", \"comm=\", \"1\")\n              @_systemd = result.stdout.chomp == \"systemd\"\n            else\n              @_systemd = false\n            end\n          end\n          @_systemd\n        end","sourceCodeStart":690,"sourceCodeEnd":726,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/util/platform.rb#L690-L726","documentation":"When Windows interop is enabled (VAGRANT_WSL_ACCESS_WINDOWS_USER set), Vagrant executes `vagrant.exe --version` and compares the parsed version string against the Linux-side Vagrant::VERSION (wsl_validate_matching_vagrant_versions! in lib/vagrant/util/platform.rb). Any mismatch — or a failed/unparsable version check reported as 'unknown' — raises WSLVagrantVersionMismatch with both versions.","triggerScenarios":"Enabling Windows access from WSL while the Vagrant installed on Windows (vagrant.exe found on PATH) is older or newer than the one inside WSL; vagrant.exe present but its --version output cannot be parsed (windows_version nil → 'unknown').","commonSituations":"Updating Vagrant via installer/winget on Windows but not the package inside WSL (or vice versa); WSL PATH resolving to a different Windows install.","solutions":["Align both installs to the exact same version: update the Windows installer and the WSL-side package together","If you do not need Windows access, unset VAGRANT_WSL_ACCESS_WINDOWS_USER — the validation is skipped entirely","Verify both sides: `vagrant --version` in WSL and `vagrant.exe --version` on Windows"],"exampleFix":"# before\nexport VAGRANT_WSL_ACCESS_WINDOWS_USER=1   # versions differ -> error\n\n# after: align versions, keep access on\n# (Windows) winget upgrade Hashicorp.Vagrant\n# (WSL)    update to the matching version, then:\nexport VAGRANT_WSL_ACCESS_WINDOWS_USER=1","handlingStrategy":"validation","validationCode":"require 'vagrant'\n\ndef wsl_versions_match?\n  out = `vagrant.exe --version 2>/dev/null`\n  m = out.match(/Vagrant (\\S+)/)\n  !!(m && m[1].strip == Vagrant::VERSION)\nend\n\nENV.delete('VAGRANT_WSL_ACCESS_WINDOWS_USER') unless wsl_versions_match?","typeGuard":null,"tryCatchPattern":"begin\n  Vagrant::Util::Platform.wsl_validate_matching_vagrant_versions!\nrescue Vagrant::Errors::WSLVagrantVersionMismatch => e\n  warn e.message\n  ENV.delete('VAGRANT_WSL_ACCESS_WINDOWS_USER') # degrade gracefully\nend","preventionTips":["Treat Windows and WSL Vagrant installs as one unit — upgrade them together","Compare versions automatically before enabling interop","Unset VAGRANT_WSL_ACCESS_WINDOWS_USER on hosts that do not need Windows-side access"],"tags":["wsl","version-mismatch","windows","interop"],"backgroundTag":"tool-version-mismatch","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}