これは、Hyper-V を Android エミュレータと組み合わせて動作させようとしている 2 台目のマシンですが、まだ答えが見つかっていません。何が足りないのでしょうか?
構成:
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