Skip to main content

Issues installing WSL2 on Windows instance

This document provides guidance on the causes and solutions for issues that may occur when installing WSL version 2 on a KakaoCloud Windows instance.


Error occurs during WSL2 installation​

When executing the WSL (Windows Subsystem for Linux) --install command on a Windows instance, WSL version 2 is installed by default.
WSL 2 requires nested virtualization, which involves direct access to hardware. Since KakaoCloud’s Virtual Machine environment does not currently support such hardware-level access, WSL 2 is not supported.

info

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

Error message​

When attempting to install Ubuntu or another distribution in a WSL 2 environment, the following error may occur, terminating the installation process.
This is caused by the presence of WSL 2:

Failed installation of Ubuntu 22.04
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 distribution 'Ubuntu-22.04' failed with exit code 1.
Error code: Wsl/InstallDistro/WSL_E_INSTALL_PROCESS_FAILED

Resolve issue​

You can resolve the issue by switching from WSL 2 to WSL 1 and reinstalling the Ubuntu distribution.

  1. Check the current WSL version using the following command. If the default version is 2, WSL 2 is active.

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

    Change WSL version
    wsl --set-default-version 1
    Output
    The operation completed successfully.
  3. Reinstall the Ubuntu 22.04 distribution, which previously failed.

    Install Ubuntu 22.04 distribution
    wsl --install -d Ubuntu-22.04
    Output (successful)
    Starting Ubuntu 22.04 LTS...
    Installing, this may take a few minutes...
    Please create a default UNIX user account. The username does not need to match your Windows username.
    For more information visit: https://aka.ms/wslusers
    Enter new UNIX username: {user_name}
    New password:
    Retype new password:
    passwd: password updated successfully

    The operation completed successfully.
    Installation successful!
    To run a command as administrator (user "root"), use "sudo <command>".
    See "man sudo_root" for details.

    Welcome to Ubuntu 22.04.6 LTS (GNU/Linux 4.4.0-20348-Microsoft x86_64)
    ...<snipped>