報錯信息:
Containers Windows Feature is not available 在 CommunityInstaller.EnableFeaturesAction.GetFeaturesToEnable() 在 CommunityInstaller.EnableFeaturesAction.<DoAsync>d__29.MoveNext() --- 引發異常的上一位置中堆棧跟蹤的末尾 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 CommunityInstaller.InstallWorkflow.<HandleD4WPackageAsync>d__29.MoveNext() --- 引發異常的上一位置中堆棧跟蹤的末尾 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 CommunityInstaller.InstallWorkflow.<ProcessAsync>d__24.MoveNext()
系統為Win10家庭版,已安裝Hyper-V並開啟,Bios也已經設置虛擬化:已啟用,注冊表也把EditionID改成了Professional,不知道為什么還會有問題。
截圖:

在網絡上遍尋無果,最后決定在CSDN上提問,感謝90后中年java的回答,網址為https://ask.csdn.net/questions/1054279。
解決方案:
還需要安裝container服務
pushd "%~dp0" dir /b %SystemRoot%\servicing\Packages\*containers*.mum >containers.txt for /f %%i in ('findstr /i . containers.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i" del containers.txt Dism /online /enable-feature /featurename:Containers -All /LimitAccess /ALL pause
保存為.bat批處理文件,以管理員身份運行,重啟安裝。
