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.
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.
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.
-
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 versionwsl --status
OutputDefault Version: 2
-
Change the WSL version from
WSL 2
toWSL 1
.Change WSL versionwsl --set-default-version 1