WSL as provider for Vagrant

Is it possible to use WSL as a provider for Vagrant? Currently I use Docker and VirtualBox as providers, but would like to use WSL as a provider on Windows.

1 Like

Currently there is no WSL provider for Vagrant. However, you can run Vagrant on WSL1 (Vagrant and Windows Subsystem for Linux | Vagrant by HashiCorp).

@soapy1 Sorry, I didn’t understand what you said. I want to use WSL as the provider, aka the guest which Vagrant manages.
Currently, when the host is Windows 10, I use Docker or VirtualBox as the provider, i.e., Docker as a guest.
So, when the host is Windows 10, I want to use WSL as the provider
I don’t want to use Vagrant inside WSL, but WSL as the guest which Vagrant manages.

I thought that, since WSL is just Linux, it should be possible (Maybe using Hyper-V or something like that).
Windows as the host and Linux (WSL) as the guest.

Sorry for the confusion, let me clarify. Vagrant does not ship a WSL provider. You might be able to find a community plugin that does what you are looking for. But that functionality is not supported by the Vagrant team.

+1

Vagrant acts as a “proxy”-layer to abstract the underlying VirtualBox provider (or whatever provider - eg. VMWare). It is a very good idea if Vagrant would support WSL provider in this case.

If we have this, then we could allow the end-users to swap among “VirtualBox” | “VMWare” | “WSL” | or whatever future providers - without the end-user to bother with the backend details.

This would promote cross-platform compatibility.

I upvote this.

+1

I am also interested in a WSL2 provider.