Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 1.1 KB

README.md

File metadata and controls

24 lines (19 loc) · 1.1 KB

Vagrant

By default, when running Vagrant inside WSL2 instance it uses the hypervisor(VirtualBox, VMware or such) that is set up on the host machine. The following repository contains an envar VAGRANT_WSL_NESTED_VIRTUALIZATION which when set to true, allows you to run Vagrant on WSL2 with nested virtualization enabled and VirtualBox installed inside the WSL instance.

Installing from Source

Clone the repository locally.

Install Ruby

sudo apt install ruby-dev

Clean bundle cache.

bundle clean

Install with the following commands

bundle install
bundle --binstubs exec

Add the following to the .bashrc file

export PATH="$(dirname ~/vagrant/exec)/exec:$PATH"
export VAGRANT_WSL_NESTED_VIRTUALIZATION=true

Running vagrant in WSL2 will use the hypervisor installed on the WSL2 instance enabling true nested virtualization.