报错信息:
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%servicingPackages*containers*.mum >containers.txt for /f %%i in ('findstr /i . containers.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%servicingPackages\%%i" del containers.txt Dism /online /enable-feature /featurename:Containers -All /LimitAccess /ALL pause
保存为.bat批处理文件,以管理员身份运行,重启安装。