

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.
