Use Windows Subsystem Linux on Arm Windows UTM machines in Apple M1

giper45
3 min readApr 18, 2024

--

This simple guide show how to install WSL on a Windows Arm virtual machines on UTM and Apple M1 systems.

WSL on UTM Windows ARM machine

Context

WSL is a wonderful approach for using Linux on Windows machines. UTM provides a great virtualization open-source environment for running qemu instances.
Unfortunately, there are some issues with running WSL on Windows Arm machines.
In this guide, I will explain to you how to overcome these issues.
As M1 does not support nested virtualization, it is not possible to install WSL version 2.
When you try to install it, it could generate the following error:

Installing, this may take a few minutes…
WslRegisterDistribution failed with error: 0x80370102
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization

This means that you have to downgrade the WSL version to 1 in order to use WSL.

UTM Windows configuration

These are my working UTM Windows configurations:

From a fresh Window VM WSL

The installation on a fresh Windows where you have not installed WSL is very simple.

After you run the UTM VM, do the following steps:

  1. Turn Windows features on or off and enable Windows Subsystem for Linux

2. Restart the UTM VM

3. Open a new PowerShell administrative and set default version to 1.

4. Now install the WSL Ubuntu

The machine will be available through powershell or file explorer:

For machines with WSL already installed

Suppose that you already installed wsl:

If you try to run Ubuntu you will have the following error:

you can repeat the steps above 1–4, and install Ubuntu

You can now use it by sending the wsl command or by the explorer:

Conclusions

In this simple tutorial, we show how it is possible to install WSL in Windows ARM machines run inside the UTM virtual system. Unfortunately, it is necessary to downgrade WSL to version 1 by reducing the number of functionalities.

WSL 1 vs WSL 2. Ref: https://learn.microsoft.com/en-us/windows/wsl/compare-versions

However, the WSL system can be completely used with functions supported in V1. Through WSL we can leverage all the features of a Linux system.

--

--