这是我尝试让 Hyper-V 与 Android 模拟器结合使用的第二台机器,但仍然没有找到答案。我遗漏了什么?
配置:
AMD Ryzen 9 9300x Processor, 32 Gb Ram, 1Tb SSD.
BIOS Version/Date American Megatrends Inc. P4.20, 6-11-2020
在 PowerShell 中使用以下命令:
PS C:\Windows\system32> Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
FeatureName : Microsoft-Hyper-V
DisplayName : Hyper-V Platform
Description : Provides the services that you can use to create and manage virtual machines and their resources.
RestartRequired : Possible
State : Enabled
CustomProperties :
PS C:\Windows\system32> get-service | findstr vmcompute
Running vmcompute Hyper-V Host Compute Service
PS C:\Windows\system32> wmic OS Get DataExecutionPrevention_Available
DataExecutionPrevention_Available
TRUE
PS C:\Windows\system32> wmic OS Get DataExecutionPrevention_SupportPolicy
DataExecutionPrevention_SupportPolicy
2
甚至使用 wbemtest 将上述值设置为 1,如下所述:
EDIT
Value is back to 2 after reboot
所有模拟器都使用 x86,但仍然说我应该打开 Hyper-V:
值 = TRUE 表示 Hyper-V 处于活动状态且已打开。
答案1
对于所有遇到此问题的人。这是解决方案。
我执行了以下命令:
PS C:\Windows\system32> Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online
FeatureName : Microsoft-Hyper-V-All
DisplayName : Hyper-V
Description : Provides services and management tools for creating and running virtual machines and their resources
.
RestartRequired : Possible
State : Enabled
CustomProperties :
PS C:\Windows\system32> Get-WindowsOptionalFeature -FeatureName HypervisorPlatform -Online
FeatureName : HypervisorPlatform
DisplayName : Windows Hypervisor Platform
Description : Enables virtualization software to run on the Windows hypervisor
RestartRequired : Possible
State : Disabled
CustomProperties :
默认情况下,虚拟机管理程序似乎被禁用(为什么会这样)。下面的命令启用了它。这应该在文档中,而不是隐藏在故障排除页面的某个地方。
PS C:\Windows\system32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Path :
Online : True
RestartNeeded : False
PS C:\Windows\system32> Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform -All
Path :
Online : True
RestartNeeded : False