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.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

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

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay