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

Vagrant 1.9.5 to 2.0.0 on WSL Creators Update version (4.4.0-43-Microsoft) asking for vagrant.exe #8962

Closed
jkeslin-argonne opened this issue Sep 11, 2017 · 9 comments · Fixed by #9107
Assignees
Milestone

Comments

@jkeslin-argonne
Copy link

jkeslin-argonne commented Sep 11, 2017

Vagrant version

vagrant versions 1.9.5 to 2.0.0 show this behavior

Host operating system

Windows 10 Enterprise 1703 (OS Build 15063.540)

Guest operating system

Linux 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial

Vagrantfile

Please note, if you are using Homestead or a different Vagrantfile format, we
may be unable to assist with your issue. Try to reproduce the issue using a
vanilla Vagrantfile first.

Debug output

Gist Debug Output

Expected behavior

[jkeslin@HOSTNAME ~/tmp]$ vagrant global-status
id       name   provider state  directory
--------------------------------------------------------------------
There are no active Vagrant environments on this computer! Or,
you haven't destroyed and recreated Vagrant environments that were
started with an older version of Vagrant.

Actual behavior

[jkeslin@HOSTNAME ~/tmp]$ vagrant global-status
The executable 'vagrant.exe' Vagrant is trying to run was not
found in the PATH variable. This is an error. Please verify
this software is installed and on the path.

Steps to reproduce

  1. Update windows 10 to 1703
  2. Install WSL 16.04
  3. Follow directions on wsl install page and install 1.9.5 or higher
  4. run vagrant global-status or any vagrant command

References

Are there any other GitHub issues (open or closed) that should be linked here?
For example:

@jkeslin-argonne
Copy link
Author

jkeslin-argonne commented Sep 11, 2017

Discussion on vagrant google groups here:

google groups discussion link

@chrisroberts chrisroberts added this to the 2.0.1 milestone Sep 11, 2017
@chrisroberts chrisroberts self-assigned this Sep 11, 2017
@dezza
Copy link

dezza commented Oct 5, 2017

# Confirm Vagrant versions installed within the WSL and the Windows system
# are the same. Raise error if they do not match.

Does this mean it is actually required to install both Windows and Linux versions of Vagrant? (yes)

I'm asking because elsewhere I see people mentioning it should work entirely as standalone in WSL and this comment above, the code and the install guide below seems to suggest the opposite?

https://www.vagrantup.com/docs/other/wsl.html#vagrant-installation

Vagrant must be installed within Ubuntu on Windows. Even though the vagrant.exe file can be executed from within the WSL, it will not function as expected.

I tried installing Vagrant on Windows meanwhile and disk is noisy now so I expect it works..

https://upl.io/vh0kkq

Seems it does.

From the top of the guide:

Installation requires WSL, Ubuntu on Windows, and Vagrant. Read on for installation instructions for each item.

Vagrant is ambigous here (Windows/Linux). Although the "Installation instructions for each item" mentions the Linux-version.

Versions

Vagrant 2.0.0 (Linux|Windows)
test-kitchen 1.18
kitchen-vagrant 1.2.1
VirtualBox 5.1.26 r1172224 (Vagrant supports VirtualBox 5.1 since 1.8.5)

@jkeslin-argonne
Copy link
Author

Now try to run an ansible provisioning step in WSL now... does it allow you to run ansible? If you only install windows vagrant, with a windows virtualbox, and then run from wsl, then once it gets to ansible provisioning step for me it complains about not being able to run ansible as a windows host control machine. Ansible has to be run from vagrant on the wsl side which my guess is probably why the code wants it installed in both places.

That was my experience anyways.

@chrisroberts
Copy link
Member

@dezza That is only relevant if you have Vagrant installed within the Windows system and within the WSL. If it is installed in both places it will require the same version be in use.

@dezza
Copy link

dezza commented Oct 5, 2017

@chrisroberts please explain. I only ever installed the Windows version after numerous attempts at getting Linux-only to work and it ended up asking for vagrant.exe everytime. I never thought you should have both nor did I have before. When it should be asking for “vagrant” it was asking for “vagrant.exe” that is when only vagrant was installed in WSL.

I think I get what you mean - but since it should be possible to run vagrant standalone in WSL this function actually prevents that

wsl_validate_matching_vagrant_versions!

If there's a a reason behind this please explain. In what case would a user want both Windows and Linux version of Vagrant installed?

If you comment out that function it works as expected.

@chrisroberts
Copy link
Member

@dezza There was a missing check when validating versions that's fixed in PR #9107. Fix will be included in the next release.

@jkeslin-argonne
Copy link
Author

jkeslin-argonne commented Oct 25, 2017

@chrisroberts So, for windows 10 with WSL, is it required to have both vagrant for linux and vagrant for windows installed now? What is the correct way of running vagrant in windows 10 in WSL and is the documentation updated also?

@chrisroberts
Copy link
Member

@jkeslin-argonne Having the vagrant.exe installed within Windows should not be a prerequisite for installing and running Vagrant within the WSL. The missing path check is what is currently requiring it to be installed, and that is only the case when windows access from the WSL is enabled (VAGRANT_WSL_ENABLE_WINDOWS_ACCESS is set). The next release will correct the behavior.

@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants