I finally got the update to version 2004 of Windows 10 (OS Build 19041.329) which now includes support for running a Linux kernel inside a VM, using paravirtual drivers letting it hook into Windows 10. It reminds me of WinOS/2 where, OS/2 would run Windows 3.1 in a virtual machine, but using special drivers it could redirect it on the native filesystem, and paint the windows on the OS/2 desktop.
So the first thing is make sure you have 2004, winver should look like this:
You will need to go to the old control panel, and enable the Virtual Machine Platform. For those of you using VMware, you’ll need at least version 15.5.5 (15.5.6 is current as of the time of me writing this). I’d suggest you do that before turning on this, but some people like to live dangerously. Also fully shut down all your VM’s otherwise things will end up giving you errors (as you’ll see later).
After the Virtual Machine Platform is installed, your machine will need to reboot. After a reboot, you’ll need to download the Linux Update to the system, available at:
It’s a simple install, and only takes a few seconds. I didn’t have to reboot.
now for the fun parts, you’ll need to list and shut down (terminate) your running WSL’s if you have any running.
C:\Users\neozeed>wsl --list --verbose NAME STATE VERSION Debian Running 1
As you can see I only have one, and it’s called Debian, and it is currently running something. Let’s kill it!
C:\Users\neozeed>wsl -t Debian C:\Users\neozeed>wsl --list --verbose NAME STATE VERSION Debian Stopped 1
And now it’s stopped. The command to upgrade is pretty simple:
C:\Users\neozeed>wsl --set-version Debian 2 Conversion in progress, this may take a few minutes… For information on key differences with WSL 2 please visit https://aka.ms/wsl2
And yes, you can also stop the WSL instance, and move it back to version 1, if you find 2 not doing what you want. However on first impressions, WSL2 is significantly faster.
If you are running VMware, and you didn’t shut down your VM’s you’ll get this lovely message when you try to resume:
The save state will be deleted, but rest assured it’ll launch okay (at least mine did!)
One sad consequence of using the Microsoft Virtual Machine framework is that nesting is no longer available.
which is kind of a bummer, as that was the killer feature.
My big annoyance with WSL2 is that it doesn’t appear to support NIC bridge mode like WSL1 does. Consequently you can’t easily run a SSH or web server under WSL2 that can be accessed from another machine.
https://github.com/microsoft/WSL/issues/4150
Yeah I’ve been looking at the same thing. You can do a tcp port redirect . I forgot the syntax, I’ll have to go through my notes.
Although the “cheat” I guess is to create a wsl1 instance to run sshd
Use VMWare Workstantion 16 ( today, may be in Beta stage)
If you’re curious about WSL2 but you depend on running VirtualBox VMs then stop. I wasted a day learning this the hard way and also managed to subtly bork the perfectly fine WSL1 install I had.