Skip to main content

Resolve WSL2 installation issue on Windows instance

This document provides guidance on identifying and resolving issues that occur when installing the WSL2 version on KakaoCloud Windows instances.


Error occurs during WSL2 installation

When using the WSL(Windows Subsystem for Linux) --install command to install WSL on a Windows instance, the default installation is WSL 2.

WSL 2 requires nested virtualization, which allows direct access to hardware. Currently, KakaoCloud's virtual machine environment does not support such hardware-level access, making WSL 2 unsupported.

info

This guide uses the Ubuntu 22.04 distribution as an example. The same issue may occur with other distributions, and the solution remains the same.

Error message

When attempting to install Ubuntu or other distributions in the WSL 2 environment, the following error message may appear, causing the installation to fail.
This error arises because WSL 2 is being used.

Ubuntu 22.04 distribution installation failed
Installing: Ubuntu 22.04
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
Press any key to continue...
The installation process for the distribution 'Ubuntu-22.04' has failed with exit code 1.
Error code: Wsl/InstallDistro/WSL_E_INSTALL_PROCESS_FAILED

Resolve issue

To resolve the issue, change the installed WSL version to WSL 1 and reinstall the Ubuntu distribution.

  1. Check the currently installed WSL version using the following command. If the default version is displayed as 2, then WSL 2 is active.

    Check WSL version
    wsl --status
    Output
    Default Version: 2
  2. Change the WSL version from WSL 2 to WSL 1.

    Change WSL version
    wsl --set-default-version 1