Android Emulators Visual Studio에서 Hyper-V를 사용할 수 없습니다.

Android Emulators Visual Studio에서 Hyper-V를 사용할 수 없습니다.

이것은 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


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

에뮬레이터는 모두 x86을 사용하지만 여전히 Hyper-V를 켜야 한다고 말합니다.

여기에 이미지 설명을 입력하세요

값 = TRUE는 Hyper-V가 활성화되어 켜져 있음을 의미합니다.

여기에 이미지 설명을 입력하세요

답변1

이 문제가 있는 모든 사람들에게. 해결책은 다음과 같습니다.

이 페이지를 읽은 후:https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/troubleshooting?pivots=windows#accel-issues-win

다음 명령을 실행했습니다.

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

관련 정보