WSL을 삭제했다가 다시 설치하려는데 0x80070422 에러가 생기면서 설치에 실패하는 경우가 있습니다. WSL 을 삭제하는 과정에서 손상된 레지스트리 키 때문에 wsl 서비스가 비활성화된 경우인데, store 에서 ubuntu 를 직접 설치하면서 해결된 사례가 있었지만 제 경우에는 적용되지 않아 여러가지 방법을 시도하다 알게된 해법입니다.. reddit

에러 증상

PS C:\WINDOWS\system32> wsl --install
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
Error code: Wsl/InstallDistro/0x80070422

이전에 WSL을 삭제하면서 서비스 레지스트리 설정이 함께 제거되어, WSL 관련 서비스(WslService, lxss)가 비활성화된 상태입니다. github

해결 방법

관리자 권한으로 PowerShell을 실행하고 다음 명령어를 입력하세요.

1단계: WslService 활성화

sc.exe config wslservice start= demand
sc.exe start wslservice

중요: start= 뒤에 공백이 하나 있어야 합니다. blog.gitcode

2단계: lxss 서비스 활성화

sc.exe config lxss start= auto
sc.exe start lxss

이미 실행 중이라는 메시지(An instance of the service is already running)가 나와도 정상입니다.

3단계: 서비스 상태 확인

Get-Service WslService
Get-Service lxss

둘 다 "Running" 상태로 표시되면 성공입니다.

4단계: WSL 설치

wsl --install Ubuntu-24.04

기본 wsl --install 명령어가 네트워크 오류(0x80072efe)를 일으킬 수 있으므로, 특정 디스트리뷰션을 명시하여 설치하는 것이 더 안정적입니다. github

실제 해결 과정

PS C:\WINDOWS\system32> sc.exe config wslservice start= demand
[SC] ChangeServiceConfig SUCCESS

PS C:\WINDOWS\system32> sc.exe start wslservice
SERVICE_NAME: wslservice
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 2  START_PENDING
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x7d0
        PID                : 17360
        FLAGS              :

PS C:\WINDOWS\system32> sc.exe config lxss start= auto
[SC] ChangeServiceConfig SUCCESS

PS C:\WINDOWS\system32> Get-Service WslService

Status   Name               DisplayName
------   ----               -----------
Running  WslService         WSL Service

PS C:\WINDOWS\system32> wsl --install Ubuntu-24.04
Downloading: Ubuntu 24.04 LTS
Installing: Ubuntu 24.04 LTS
Distribution successfully installed. It can be launched via 'wsl.exe -d Ubuntu-24.04'

왜 이 방법이 효과적인가?

WSL을 삭제할 때 레지스트리의 서비스 설정이 함께 제거되면서, WSL 관련 서비스가 "비활성화(Disabled)" 상태로 변경됩니다. Windows는 비활성화된 서비스를 시작할 수 없기 때문에 0x80070422 에러가 발생합니다. github

sc.exe config 명령어는 서비스의 시작 모드를 직접 변경하여 레지스트리를 복구합니다: blog.gitcode

  • wslservice start= demand: WSL 서비스를 필요할 때 시작하도록 설정 (수동 시작)
  • lxss start= auto: lxss 서비스를 자동으로 시작하도록 설정