需要使用WSL,所以需要打开Hyper-V服务。在添加删除程序里找不到Hyper-V,可能因为我是Win11 Home。然后重启在BIOS里,也找不到打开类似Intel Virtualization的选项,因为我用的Dell。最后通过以下几步成功开启Hyper-V服务:
随便打开一个文本编辑器,写入
pushd "%~dp0" dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hv.txt for /f %%i in ('findstr /i . hv.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i" del hv.txt Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL pause随便保存在一个位置,名字为hv.bat
找到这个文件,右键以管理员运行。需要一段挺长时间下载安装。
重启电脑,就可以在开始里面搜索到Hyper-V Manager了。
