![]() VAGRANT_WSL_ENABLE_WINDOWS_ACCESS: Enables Vagrant to use Features that are installed on your Windows client and not within WSL.zshrc, depending on which shell you use).Īttention: Please adjust the path to your user home and the Virtualbox installation to your setup! # Setup VagrantĮxport VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"Įxport VAGRANT_WSL_WINDOWS_ACCESS_USER_HOME_PATH="/mnt/c/Users/username/"Įxport PATH="$PATH:/mnt/d/Programs/Virtualbox" Then, as the final move, you have to put some additional environment variables in you WSLs profiles (e.g.bashrc or. Sudo apt-get update & sudo apt-get install vagrant Sudo apt-add-repository "deb $(lsb_release -cs) main" ![]() For Ubuntu distributions, you can also add the Vagrant repository and install Vagrant, using the following lines: curl -fsSL | sudo apt-key add. Install the package with the package manager included in your distribution (most likely apt). Under Windows, you need to download and run the msi package and for WSL2, you can download the Vagrant package (same version as you installed on your Windows client) directly from here. You can find more information regarding the installation here. You must install the same version of Vagrant in both environments. You need to install Vagrant on your Windows machine as well as in WSL2. After many hours of trying, I still haven’t got any VM running and accessible with Hyper-V and Vagrant. You may want to use Hyper-V as your Hypervisor as you’re are already on a Windows machine when you found these words, I tried it out and can clearly not recommend you Hyper-V in combination with Vagrant and WSL. The installation of WSL and Virtualbox is not part of this introduction. ![]() I presume, that you’ve WSL2 and Virtualbox already running on your system. You can describe them in a Ruby styled way and deploy even a multi-VM environment with a simple configuration file and by running vagrant up. Vagrant uses so called Boxes which can be seen like Docker Images, just as VMs. Vagrant is really helpful when you want to setup a predefined, always the same environment to run some tests or to develop on. Even when you got the installation right, there are still some stumbling blocks waiting for you when you try to run Ansible Playbooks during vagrant up. For a non-Linux user, it can get a little bit tricky when combining Vagrant with the Windows Subsystem for Linux (WSL). ![]() Install and running Vagrant is in general pretty straightforward. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |