Through the environment variable VAGRANT_WSL_ENABLE_WINDOWS_ACCESS, Vagrant understand that it may access the Windows system to run executable files and use functions such as synced folders. You can add the above line to your ~/.profile file and reload it using the following commands: nano ~/.profile export PATH="$PATH:/mnt/c/Windows/System32/WindowsPowerShell/v1.0" For example, if Windows drive C: on Linux is mounted as /mnt/c, add the following PATH variable. You can just add path to Powershell to your PATH environment variable under Linux. If the Linux is running under Windows host as a Windows Subsystem for Linux (WSL/WSL2) or as a Docker container, Vagrant will be looking for a PowerShell executable for Windows (.exe-file). Vagrant is starting Windows executables from Linux. Is Vagrant supported in this fashion, running in an Ubuntu Docker container on Windows in PowerShell? There is nothing in my Vagrant file that refers to anything about Powershell. It seems like Vagrant in Docker Ubuntu is looking for a Windows installation. The installation was successful, and I am able to launch a new PowerShell, but the same error message comes. I have installed PowerShell for Ubuntu 20.04 (my version) following the instructions here: Please ensure PowerShell is installed and available on the local PATH, then run the command again. However, when I run vagrant up from my Ubuntu docker container (running in a PowerShell) I am getting an error:įailed to locate the PowerShell executable on the available PATH. The examples also require VirtualBox and Vagrant to be installed in Ubuntu, so I installed those in my Ubuntu container, and again all is well. So I thought I would install an Ubuntu Docker container, and that went well. I am taking some training where all of the examples are in Ubuntu, but I am on Windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |