Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't work vagrant global-status on WSL2 #13497

Open
TeUm3048 opened this issue Aug 30, 2024 · 1 comment
Open

Don't work vagrant global-status on WSL2 #13497

TeUm3048 opened this issue Aug 30, 2024 · 1 comment

Comments

@TeUm3048
Copy link

Debug output

teum3@DESKTOP-1EGR758:/mnt/c$ vagrant global-status
id       name    provider   state   directory
-----------------------------------------------------------------------------------
879be91  default virtualbox running /mnt/c/Projects/ansible-test-01
35688e3  default virtualbox running /mnt/c/Projects/WSL-Ansible-Vagrant-VirtualBox

The above shows information about all known Vagrant environments
on this machine. This data is cached and may not be completely
up-to-date (use "vagrant global-status --prune" to prune invalid
entries). To interact with any of the machines, you can go to that
directory and run Vagrant, or you can use the ID directly with
Vagrant commands from any directory. For example:
"vagrant destroy 1a2b3c4d"

teum3@DESKTOP-1EGR758:/mnt/c$ cd ~

teum3@DESKTOP-1EGR758:~$ vagrant global-status
Vagrant failed to initialize at a very early stage:

The version of powershell currently installed on this host is less than
the required minimum version. Please upgrade the installed version of
powershell to the minimum required version and run the command again.

  Installed version: /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0//powershell.exe: Invalid argument

  Minimum required version: 3

Full debug output — https://gist.github.com/TeUm3048/41ef530a5b85249e2ee1fa4cf506ad5d

Expected behavior

Show the state of active environments as in /mnt/c/

Actual behavior

Cann't find PowerShell

Reproduction information

Vagrant version

Vagrant 2.4.1

Host operating system

Windows 11 Pro 23H2
Ubuntu 22.04.4 LTS via WLS2
drvfs mount C: with metadata

Steps to reproduce

  1. Up any environment from WSL2 in /mnt/c/
  2. Change directory to /home/user cd ~
  3. Show global status vagrant vagrant global-status
@TeUm3048
Copy link
Author

I have PowerShell7 installed in C:\Program Files\PowerShell\7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant