为什么我运行docker桌面时总是出现“意外的WSL错误”错误?

问题描述 投票:0回答:1

错误如下:1

我的 wsl 总是有问题: 当我跑步时

wsl --set-version Ubuntu-22.04 2

错误信息如下:

"Your current computer configuration does not support WSL 2. Please enable the 'Virtual Machine Platform' optional component and ensure that virtualization is enabled in BIOS. For more information, visit https://aka.ms/enablevirtualization. Error code: Wsl/Service/CreateVm/0x80370102"

我的操作系统版本是windows 11 home,我在系统中没有找到hyper-v,所以我运行一个脚本来安装它。

pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL

我已经使用任务管理器检查了 vt BIOS 正在运行的虚拟化。我跑了

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

并在将版本设置为 2 之前重新启动计算机。它只是不起作用。那么这个问题与我的 docker 错误有关吗?我该如何解决它们?

docker windows-subsystem-for-linux hyper-v
1个回答
0
投票

嗨,你解决了吗,我遇到了同样的错误?

© www.soinside.com 2019 - 2024. All rights reserved.