Hyper-V funktioniert nicht mit dem Visual Studio des Android-Emulators

Hyper-V funktioniert nicht mit dem Visual Studio des Android-Emulators

Dies ist die zweite Maschine, auf der ich versuche, Hyper-V in Kombination mit den Android-Emulatoren zum Laufen zu bringen, und ich habe immer noch keine Antwort gefunden. Was übersehe ich?

Aufbau:

AMD Ryzen 9 9300x Processor, 32 Gb Ram, 1Tb SSD. 
BIOS Version/Date   American Megatrends Inc. P4.20, 6-11-2020

In PowerShell werden folgende Befehle verwendet:

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

Setzen Sie den obigen Wert sogar mit wbemtest auf 1, wie hier beschrieben:


EDIT
Value is back to 2 after reboot


https://docs.microsoft.com/en-us/troubleshoot/windows-client/performance/determine-hardware-dep-available.

Die Emulatoren verwenden alle x86, aber es wird trotzdem gesagt, dass ich Hyper-V einschalten soll:

Bildbeschreibung hier eingeben

Wert = TRUE, was bedeutet, dass Hyper-V aktiv und eingeschaltet ist.

Bildbeschreibung hier eingeben

Antwort1

Für alle, die dieses Problem haben. Hier ist die Lösung.

Nach dem Lesen dieser Seite:https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/troubleshooting?pivots=windows#accel-issues-win

Ich habe die folgenden Befehle ausgeführt:

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 :

Standardmäßig scheint der Hypervisor deaktiviert zu sein (warum, um Himmels willen). Die folgenden Befehle haben ihn aktiviert. Dies sollte in der Dokumentation stehen und nicht irgendwo auf einer Seite zur Fehlerbehebung versteckt sein.

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

verwandte Informationen