DEV Community

01kg
01kg

Posted on

1

Azure Windows 11 VM | How to run Ubuntu on WSL

Prerequisites

  1. VM size series that support Hyper-V, which is essential for WSL, are Dv3 and Ev3.
  2. Regions that provide Dv3 and Ev3: US West 2, US East, Europe West, Southeast Asia. (Sorry, I did not googled out any official page that shows updated list of regions. Only found this old post. If you know the updated list, please leave a comment.)
  3. Windows 10, Windows 10 LTSB/LTSC, Windows 11, Windows Server 2016, Windows Server 2019 and Windows Server 2022 (which supports WSL)
  4. In the process of creating the VM, select "Security type" to "Standard". Not "Trusted Launch".

TL;DR

  1. Connect the VM through RDP
  2. Go to Microsoft Store, download Ubuntu 24.04 LTS. Or, follow this doc to install other versions in other ways.
  3. Open a PowerShell window, run wsl --install --no-distribution to install WSL.
  4. Restart Windows.
  5. In Windows start menu, click the newly installed "Ubuntu 24.04" Image description

Pitfalls

Do I need to run Set-VMProcessor -VMName <My Vm Name> -ExposeVirtualizationExtensions $true ?

No. Not in my case

What does this error mean?
Image description

You forgot to run wsl --install --no-distribution to install WSL and reboot.

👋 Was this post useful to you?

It takes one minute to join DEV and is worth it for your career.

You get 3x the value by signing in instead of lurking

Join now

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs