WS2022 WSL2 Install

Overview

As I wanted to test developping a Blazor App hosted in a Docker container, I had to go through the installation of Docker and WSL2 on my DEV VM running with Windows Server 2022. This is a quick overview of the steps I had to perform.

Hosting Computer

I had to make sure the VM I was using was supporting Virtualization. On Host (when configuring WSL2 in a VM in VM) :

1
 Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

VM configuration

Install latest windows update.

Install the required features :

1
2
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl.exe --update
wsl.exe --list --online
wsl.exe --install Ubuntu-24.04

Install Docker desktop application. Note : Although I could run docker in the WSL I want something quick and easy, and Github desktop is just perfect for my use.

References