Apr 4, 2020

Failed to install Intel HAXM

When installing Android SDK Platform-Tools on Windows you may see following error:

Running Intel® HAXM installer Failed to install Intel HAXM. 
For details, please check the installation log: HAXM installation failed. To install HAXM follow the instructions found at:
This computer does not support Intel Virtualization Technology (VT-x)
or it is being exclusively used by Hyper-V.
HAXM cannot be installed. Please ensure Hyper-V is disabled in Windows Features,
or refer to the Intel HAXM documentation for more information.
I will list 3 different options.

1. Program and Features

Be sure Hyper-V not marked. If installed uncheck it.

2. Command line (CMD)

dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
bcdedit /set hypervisorlaunchtype off

3. Device Guard and Credential Guard hardware readiness tool

Download tool, unzip and open powershell window.

First change execution policy.
PS C:\temp\dgreadiness_v3.6> set-executionpolicy remotesigned 
Execution Policy Change The execution policy helps protect you from scripts that you do not trust.
Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at https:/go.microsoft.com/fwlink/?LinkID=135170.
Do you want to change the execution policy? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): a
Run command.
PS C:\temp\dgreadiness_v3.6> .\DG_Readiness_Tool_v3.6.ps1 -Disable 
Do you want to run software from this untrusted publisher?
File C:\temp\dgreadiness_v3.6\DG_Readiness_Tool_v3.6.ps1 is published by CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US and is not trusted on your system. Only run scripts from trusted publishers.
[V] Never run [D] Do not run [R] Run once [A] Always run [?] Help (default is "D"): a
You will see success messages.
Disabling Hyper-V and IOMMU
Disabling Hyper-V and IOMMU successful
Please reboot the machine, for settings to be applied.
After reboot continue to install HAXM.