How to start WSL in Windows running in VIrtualBox #13502
Replies: 3 comments
-
@marcinpraczko: To run WSL in a virtual machine, you need to configure the virtual machine to have nested virtualization support. Here's how you can do that in VirtualBox: https://docs.oracle.com/en/virtualization/virtualbox/6.0/admin/nested-virt.html |
Beta Was this translation helpful? Give feedback.
-
🖥️ How to Run WSL Inside Windows Running in VirtualBox WSL2 requires Hyper-V and virtualization support (nested virtualization). When you install Windows inside VirtualBox, by default it cannot expose all virtualization extensions (Intel VT-x / AMD-V) needed for Hyper-V to work. As a result, WSL2 errors out because it can’t start the lightweight VM backend. 🛠️ Possible Solutions Enable Nested Virtualization (if supported) On Intel CPUs: On AMD CPUs: VirtualBox nested support is limited and may not work reliably. After enabling this, Hyper-V inside the guest OS may start working → WSL2 can run. Use WSL1 Instead of WSL2 WSL1 doesn’t require virtualization — it runs as a compatibility layer. To force install WSL1: WSL1 has limited features (no full Linux kernel, no Docker integration), but works fine inside VirtualBox. Switch to a Hyper-V–based Host VM If you really need WSL2, the more stable approach is to use Hyper-V, VMware Workstation, or Parallels as the outer hypervisor. VirtualBox has weaker nested virtualization support compared to these. Alternative: Use Docker Desktop with WSL Backend Disabled If your main goal is running containers, Docker Desktop can work with its own VM backend instead of WSL2 inside VirtualBox. 📌 Best Practice If your host machine supports Hyper-V, run Windows directly or inside a Hyper-V VM, then enable WSL2. Inside VirtualBox, the most reliable option is WSL1. ✅ In short: |
Beta Was this translation helpful? Give feedback.
-
Thank you for all replies. I will test this solution and update this discussion. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I managed to install Windows 11 In VirtualBox and I wanted start using WSL, however getting a lot of errors.
How to setup this correctly that WSL will be working also under system in Virtualization?
Beta Was this translation helpful? Give feedback.
All reactions