Update README with updated WSL2 nested virtualization setup

Updated instructions for configuring WSL2 on newer versions.
This commit is contained in:
Luca Fabbian 2026-02-01 04:18:49 +01:00 committed by GitHub
parent 4459fffdb2
commit 8276bb56d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -100,11 +100,15 @@ Credit goes to [Guillaume - The Parallel Interface blog](https://www.paralint.co
```
[boot]
command = /bin/bash -c 'chown -v root:kvm /dev/kvm && chmod 660 /dev/kvm'
```
Then, using PowerShell, open a notepad on `notepad $env:USERPROFILE\.wslconfig`. Inside, put these other flags:
```
[wsl2]
nestedVirtualization=true
```
3. Restart WSL2 via CMD prompt or Powershell
4. Restart WSL2 via CMD prompt or Powershell
```
wsl --shutdown
```
@ -114,6 +118,8 @@ Credit goes to [Guillaume - The Parallel Interface blog](https://www.paralint.co
`nestedVirtualization` flag is only available to Windows 11.
If this setup does not work, you may have an old WSL version. In that case, ignore `\.wslconfig` and put everything on `/etc/wsl.conf`, including the `[wsl2]` flag.
Use-Cases
---------