我正在尝试在我的计算机上启用 Hyper-V 以便使用 Docker。我尝试过让 Docker 启用它、使用 Windows 功能启用它以及使用 Powershell(作为管理员)。我的系统运行的是 Windows 10 Pro 64 位,并且启用了所有 Hyper-V 选项(VM 监视模式扩展、SLAT、固件中启用虚拟化、数据执行保护)。
Windows 版本:10.0.14393 Build 14393 处理器 Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 3401 Mhz, 4 核, 8 逻辑处理器 已安装物理内存 (RAM) 16.0 GB
在 PowerShell 中运行此命令(以管理员身份)有以下输出:
PS C:\WINDOWS\logs\dism> DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
Deployment Image Servicing and Management tool
Version: 10.0.14393.0
Image Version: 10.0.14393.0
Enabling feature(s)
[==========================100.0%==========================]
Error: 0x800f0831
DISM failed. No operation was performed.
For more information, review the log file.
在日志文件中:
Warning DISM DISM OS Provider: PID=10620 TID=9016 Unable to set the DLL search path to the servicing stack folder. C:\Windows may not point to a valid Windows folder. - CDISMOSServiceManager::Final_OnConnect
Warning DISM DISM Provider Store: PID=10620 TID=9016 Failed to Load the provider: C:\Users\STEVE_~1\AppData\Local\Temp\4550B806-11FA-419B-AB93-57667B96F632\PEProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
Warning DISM DISM Provider Store: PID=10620 TID=9016 Failed to Load the provider: C:\Users\STEVE_~1\AppData\Local\Temp\4550B806-11FA-419B-AB93-57667B96F632\EmbeddedProvider.dll. - CDISMProviderStore::Internal_GetProvider(
Info DISM DISM Package Manager: PID=10620 TID=29724 Error in operation: (null) (CBS HRESULT=0x800f0831) - CCbsConUIHandler::Error
Error DISM DISM Package Manager: PID=10620 TID=9016 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x800f0831)
Error DISM DISM Package Manager: PID=10620 TID=9016 Failed processing package changes with session options - CDISMPackageManager::ProcessChangesWithOptions(hr:0x800f0831)
Error DISM DISM Package Manager: PID=10620 TID=9016 Failed ProcessChanges. - CPackageManagerCLIHandler::Private_ProcessFeatureChange(hr:0x800f0831)
Error DISM DISM Package Manager: PID=10620 TID=9016 Failed while processing command enable-feature. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f0831)
知道我需要做什么才能在这台机器上启用 Hyper-V 吗?
答案1
尝试恢复图像健康(和/或清理图像)
运行这些命令
Dism /Online /Cleanup-Image /RestoreHealth
进行图像修复
Dism. exe /online /Cleanup-Image /StartComponentCleanup
这将清理(删除)组件存储中超过 45 天的被取代的 Windows 文件。
然后通过运行执行文件完整性检查
sfc /scannow
这将查找并修复损坏的系统文件(注意:SFC 会将完好文件标记为损坏,但不会造成任何损害)
尝试使用以下命令禁用并启用 Hyper -V:
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
在 PowerShell 中(以管理员身份运行)。