Try   HackMD

WSL:WslRegisterDistribution Error 0x80370102

WslRegisterDistribution Error 0x80370102 on Windows 10 解決方法

前篇:https://hackmd.io/@withhhsong/WSL_ubuntu

某天裝模擬器的時候誤關了 Hyper-V 功能,結果打開 wsl 的 ubuntu 報錯了以下:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Error: 0x80370102 The virtual machine could not be started because a required feature is not installed.

網上有很多相關的討論串,解法眾說紛紜,以下列出我在網上看到的幾個做法。
我最後是靠方法 C 修復完成(確定關閉 wsl 功能再完全重啟)

〔Method A〕

檢查主機板 BIOS 的 SVM 虛擬機設定是否啟用。
筆電只要在開機過程一直按 F2 就可以進到BIOS介面了。

AMD主機板如何通過BIOS開啟虛擬化功能(SVM)
Intel主機板如何通過BIOS開啟虛擬化功能(Virtualization Technology)

(1) 開機按 F2 進 BIOS 之後,按 F7 切換到 Advanced 模式
(2) 選擇 [Advanced] - [CPU Configuration]
(3) INTEL 啟用 [Virtualization Technology] AMD 是啟用 [SVM Mode]

〔Method B〕

(1) 打開控制台 > 解除安裝或變更程式
(2) 按左側的「開啟或關閉 Windows 功能」
(3) 勾選啟用「Windows Hypervisor 平台」
(4) 更改後系統會詢問要不要重新啟動電腦

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

〔Method C〕

(1) 打開控制台 > 解除安裝或變更程式
(2) 按左側的「開啟或關閉 Windows 功能」
(3) 關閉「Windows 子系統 Linux」還有「虛擬機器平台」
(4) 重新開機
(5) 再打勾開啟「Windows 子系統 Linux」還有「虛擬機器平台」
(6) 重新開機

※ 這是我最後修復成功的方法

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

〔Reference〕

https://askubuntu.com/questions/1264102/wsl-2-wont-run-ubuntu-error-0x80370102
https://github.com/microsoft/WSL/issues/4120


:: 2021.08.10 :: 與松 withhhsong ::

tags: withhhsong Linux Ubuntu wsl