intel / haxm

Intel® Hardware Accelerated Execution Manager (Intel® HAXM)
BSD 3-Clause "New" or "Revised" License
3.23k stars 877 forks source link

HAXM says Hyper-V is enabled when Windows says it is not #105

Closed SqlBenjamin closed 5 years ago

SqlBenjamin commented 6 years ago

I continually get an error when trying to install haxm that says: "This computer does not support Intel Virtualization Technology (VT-x) or it is being exclusively used by Hyper-V." When I run "emulator-check.exe accel hyper-v" in a command prompt I get the following:


accel: 0 HAXM is not installed, but Windows Hypervisor Platform is available. accel hyper-v: 2 Hyper-V is enabled Hyper-V


However, Windows shows that it is not enabled: image I've even made sure the services were not running and they aren't. I've double, no triple, checked that virturalization is enabled in the BIOS - it is. I've not only restarted but cut power to the machine for a bit too. I'm running a Lenovo Yoga X1. The processor is an Intel Core i7 6600U. I'm running it on Windows 10 Enterprise version 1803, build 17134.228. x64 This is happening with version 7.3 of haxm.

I'm seriously at a loss as to what to do in order to install haxm. All the forums say to do the same thing which I've already done to no avail. Is it that the check incorrectly detects Hyper-V being enabled? Do I need to uninstall a specific KB?

raphaelning commented 6 years ago

Thanks for the detailed description of the issue. It's similar to one I resolved before: https://issuetracker.google.com/issues/110260335#comment6

The gist of that post is:

Basically, Hyper-V could still be running despite what Turn Windows features on and off reports. To completely turn it off, you will need to disable a Windows Defender feature called HVCI through Windows Defender settings > Device security > Core isolation details > Memory integrity > Off (see attached screenshot). A reboot is required for this change to take effect.

windows-defender-memory-integrity

SqlBenjamin commented 6 years ago

Thanks for the reply. I just checked that and it was already off. Unfortunately, I turned it on while thinking "I'll just make sure it's off by seeing if it turns on". (facepalm). Now I have to restart and turn it back off and restart again. :) Could there be something else preventing it or causing it to think it's on?

raphaelning commented 6 years ago

Sorry for the very late reply. This is one of the posts I missed during my time off...

Besides HVCI, I'm not aware of anything else that can prevent Hyper-V from being turned off. One last try: there's a CLI way to disable Hyper-V, and it may work more reliably than the GUI way (Windows Features dialog).

  1. Open an elevated (i.e. Run as administrator) Command Prompt.
  2. bcdedit /set hypervisorlaunchtype off
  3. Also make sure HVCI (Windows Defender's memory integrity setting) is off.
  4. Reboot.
jkk88 commented 5 years ago

You can prepare Windows host with Device Guard and Credential Guard hardware readiness tool on https://www.microsoft.com/en-us/download/details.aspx?id=53337 DG_Readiness_Tool_v3.6.ps1 -disable

joshuamataaraya commented 5 years ago

I'm also not been able to install HAXM. image Hyper-V is already off image My processor is Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz, 2801 Mhz, 2 Core(s), 4 Logical Processor(s) and based on their specification it supports Intel Virtualization Technology. I can't access the core isolation setting as the device security option is not shown in my Windows Defender Security Center Menu image

raphaelning commented 5 years ago

@joshuamataaraya Your CPU definitely supports VT-x. Have you checked whether VT-x is enabled in your BIOS? If you launch the System Information tool from Start menu, it should report whether VT-x is enabled in BIOS:

Hyper-V - Virtualization Enabled in Firmware Yes

You can actually copy the entire System Summary and paste it here, because it also gives us details about your Windows installation. Of course, please feel free to redact irrelevant/personal information.

jkk88 commented 5 years ago

I'm also not been able to install HAXM.

You need to use Device Guard and Credential Guard hardware readiness tool as I wrote in previous post.

joshuamataaraya commented 5 years ago

Thanks @raphaelning and @jkk88 I've used the Device Guard and Credential Guard hardware readiness tool and it's working now

raphaelning commented 5 years ago

Great! Thanks @jkk88 for pointing us to the Device Guard readiness tool. I'm closing this issue now, but if @SqlBenjamin still can't get Hyper-V completely turned off after using the new tool, we can reopen the issue.

impactx commented 5 years ago

Hyper-V isn't showing up for me . I already enabled VT in bios and tried a bunch of things.

HaHoYou commented 5 years ago

So do you mean you already tried Device Guard readiness tool, disable it?

HaHoYou commented 5 years ago

What is your output of these command: `

bcdedit /v sc query intelhaxm powershell dgreadiness_v3.6\DG_Readiness_Tool_v3.6.ps1 -Ready`

ghost commented 5 years ago

I did pretty much everything mentioned above. But I still get the same error. I am trying to download haxm for androidstudio. I cannot continue without intelhaxm. Things I've done are mentioned below.

image

This is processor specs.

lenovospecs

Hyper-v is already disabled from features and in command.

hypervclosed hypervclosedcommand

I've used the Device Guard and Credential Guard hardware readiness tool as well.

credentialguard

Virtualization is enabled when I check through task manager. But I cannot access enabling virtualization through BIOS setting because it does not show up.

virtualization

Working for a solution for 5 days but still no progress. I disabled the antivirus program as well. I guess I do something wrong or missing sth important. Is there any other issues that can prevent downloading haxm ? Helps are appreciated. Thanks.

Nittu88 commented 5 years ago

I found some kind of trick that worked for me! Hope it will help you solve your problems too. At first I enabled Virtualization in the BIOS settings, but when I started Android emulation via Android Studio it failed to use hardware acceleration. I followed the instructions here:

Open an elevated (i.e. Run as administrator) Command Prompt. bcdedit /set hypervisorlaunchtype off Also make sure HVCI (Windows Defender's memory integrity setting) is off. Reboot.

but it didn't work.

Then I read the suggestion here: 45989491-8a2f5380-c0ae-11e8-9e62-e2fc17c55e0e and my tick has been disabled all the time.

I enabled it and restarted. When Windows restarted i ran Android Studio again, just to check it was sending the same error on screen and I got struck seeing that, instead, it was working!!!

So, what worked for me was: 1) Running the command in the Command Prompt as Administrator 2) Enable virtualization in the BIOS 3) Check the following ticks were off 53020975-d1085600-3460-11e9-9220-df7d4d9d2ba8 4) Enable this option here that was always disabled: 45989491-8a2f5380-c0ae-11e8-9e62-e2fc17c55e0e

Don't ask me why but now it works properly.

Nittu88 commented 5 years ago

Also, I uninstalled intel HAXM in Android Studio in "tools>SDK manager>SDK tools>Intel x86 Emulator Accelerator. If I try to reinstall it I get the same error as before, but at least now I can Virtualize Android...

jkk88 commented 5 years ago

Would be nice to change that misleading error message above (Ensure Hyper-V is disabled in Windows Feature), because there are more features they need to be turned off. MS article about disabling Device Guard or Credential Guard is here: https://docs.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-manage.

Nittu88 commented 5 years ago

Would be nice to change that misleading error message above (Ensure Hyper-V is disabled in Windows Feature), because there are more features they need to be turned off. MS article about disabling Device Guard or Credential Guard is here: https://docs.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-manage.

Thanks, I followed the instructions and it worked for me.

candice-dick commented 5 years ago

My laptop runs on AMD and I have followed all instructions above and I am still unable to run the emulator. Please assist, thanks

MagicAndre1981 commented 5 years ago

@candice-dick for AMD based system use Hyper-V platform, HAXM is Intel only.

ghost commented 5 years ago

Just came across this today. After 1903 update, Windows Sandbox has to be also turned off in Windows features. This fixed the problem for me.

MagicAndre1981 commented 5 years ago

@fakeinc also use Hyper-V platform instead

cihangocmen commented 5 years ago

bcdedit /set hypervisorlaunchtype off this code worked.

Omar2002 commented 5 years ago

its help for me https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/troubleshooting?pivots=windows Disabling Device Guard solved this problem.

bakeyevrus commented 5 years ago

A combination of bcdedit /set hypervisorlaunchtype off and disabling Windows Hypervisor Platform in Windows Features worked for me. intel_haxm

sampalmer commented 5 years ago

To elaborate on @MagicAndre1981's suggestion of using Hyper-V instead of HAXM, Google recently added Hyper-V support to the official Android emulator. So instead of disabling OS security features to get HAXM working, some users can use Hyper-V by opening "Windows Features" and turning on both "Hyper-V" and "Windows Hypervisor Platform".

nikolayAleksandrov commented 5 years ago

I had the same issue and guess what once I enabled Hyper-V the problem had been solved. And yes also the message was to disable this feature as recommendation

zjffun commented 4 years ago

I also meet this problem and tried above solutions, but still can't install. Then I tried close WSL function and then install successfully.

DoubleBullet commented 4 years ago

For you guys who still have not found the solution to disabling Hyper-v in any of the methods above, I have found another solution.

I would advise people to first try the solutions above, but if you tried everything then do this. Go to Task Manager, and click on the Services tab. Disable all of the Hyper-V services (Anything usually with "Hyper V" or "HV". image image image This just stops the processes and can only be brought back manually if triggered. You can fully disable the Hyper V services if you click on the Open Services tab on the bottom of the task manager. image image

Once you done that. Try to restart your computer and see if it works. If it still hasn't worked, then look in your services or processes to see if you missed any running services that are in the background.

wcwang commented 4 years ago

Thanks for your reply. The complete solution had been provided in the section One-time setup of this manual. It is suggested to follow the steps to disable Hyper-V thoroughly.

weitzhandler commented 4 years ago

I think there should be an official troubleshooting page that represents an organized checklist of things to do when facing this error. I'm already spending this over an hour and that nasty error message is still on.

weitzhandler commented 4 years ago

Finally. This solved my issue. The problem was, in Windows Features you also have to switch off Windows Hypervisor Platform. image

ahanek commented 4 years ago

I

Sorry for the very late reply. This is one of the posts I missed during my time off...

Besides HVCI, I'm not aware of anything else that can prevent Hyper-V from being turned off. One last try: there's a CLI way to disable Hyper-V, and it may work more reliably than the GUI way (Windows Features dialog).

  1. Open an elevated (i.e. Run as administrator) Command Prompt.
  2. bcdedit /set hypervisorlaunchtype off
  3. Also make sure HVCI (Windows Defender's memory integrity setting) is off.
  4. Reboot.

thanks that did the trick for me

wcwang commented 4 years ago

Thanks for your reply. Glad to know you have resolved your issue.

charan0017 commented 4 years ago

Sorry for the very late reply. This is one of the posts I missed during my time off...

Besides HVCI, I'm not aware of anything else that can prevent Hyper-V from being turned off. One last try: there's a CLI way to disable Hyper-V, and it may work more reliably than the GUI way (Windows Features dialog).

  1. Open an elevated (i.e. Run as administrator) Command Prompt.
  2. bcdedit /set hypervisorlaunchtype off
  3. Also make sure HVCI (Windows Defender's memory integrity setting) is off.
  4. Reboot.

Wow really thanks this trick worked for me too 😃

furier commented 4 years ago

image

image

image

Still getting the the following log with errors when trying to install HAXM

Preparing "Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.5.6)".
Downloading https://dl.google.com/android/repository/extras/intel/haxm-windows_v7_5_6.zip
"Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.5.6)" ready.
Installing Intel x86 Emulator Accelerator (HAXM installer) in C:\Users\furie\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager
"Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.5.6)" complete.
"Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.5.6)" finished.
Parsing C:\Users\furie\AppData\Local\Android\Sdk\build-tools\30.0.0-rc1\package.xml
Parsing C:\Users\furie\AppData\Local\Android\Sdk\cmdline-tools\latest\package.xml
Parsing C:\Users\furie\AppData\Local\Android\Sdk\emulator\package.xml
Parsing C:\Users\furie\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager\package.xml
Parsing C:\Users\furie\AppData\Local\Android\Sdk\patcher\v4\package.xml
Parsing C:\Users\furie\AppData\Local\Android\Sdk\platform-tools\package.xml
Parsing C:\Users\furie\AppData\Local\Android\Sdk\platforms\android-28\package.xml
Parsing C:\Users\furie\AppData\Local\Android\Sdk\platforms\android-29\package.xml
Parsing C:\Users\furie\AppData\Local\Android\Sdk\sources\android-28\package.xml
Parsing C:\Users\furie\AppData\Local\Android\Sdk\sources\android-29\package.xml
Parsing C:\Users\furie\AppData\Local\Android\Sdk\tools\package.xml
Android SDK is up to date.
Running Intel® HAXM installer
Failed to install Intel HAXM. For details, please check the installation log: "C:\Users\furie\AppData\Local\Temp\haxm_log11.txt"
HAXM installation failed. To install HAXM follow the instructions found at: https://software.intel.com/android/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-windows
Installer log is located at C:\Users\furie\AppData\Local\Temp\haxm_log11.txt
Installer log contents:
=== Logging started: 17.03.2020  12:19:05 ===
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.

=== Logging stopped: 17.03.2020  12:19:05 ===
Done
usman-rajput commented 4 years ago

I found another way to solve this issue. Disable virtualization from BIOS and reboot. Install HAXM independantly, it will give warning that Virtualization is disabled, and the installer will roll back the installation. Go to BIOS and again enable Virtualization, and then reboot and install HAXM. It's done!

fakhravari commented 4 years ago

I have to use this command when I bring up Mac bcdedit /set hypervisorlaunchtype off

But mobile simulator must be ordered bcdedit /set hypervisorlaunchtype auto

What exactly should be done to run both at the same time?

dimitar-nikovski commented 4 years ago

If people are still experiencing this after trying the above hit & miss solutions, this issue should be reopened.

demberto commented 3 years ago

Also disable Windows Sandbox, I have an off topic question - will HAXM improve Gameloop (Android emulator, probably customized for gaming)?

coinzdude commented 3 years ago

@joshuamataaraya Your CPU definitely supports VT-x. Have you checked whether VT-x is enabled in your BIOS? If you launch the System Information tool from Start menu, it should report whether VT-x is enabled in BIOS:

Hyper-V - Virtualization Enabled in Firmware Yes

You can actually copy the entire System Summary and paste it here, because it also gives us details about your Windows installation. Of course, please feel free to redact irrelevant/personal information.

Finally! This command and reboot did the job. This AVD tool is pretty terrible for compatibility.

hsusanoo commented 3 years ago

For me I had to uncheck Windows Hypervisor Plateform as well:

image

L96Github commented 3 years ago

For you guys who still have not found the solution to disabling Hyper-v in any of the methods above, I have found another solution.

I would advise people to first try the solutions above, but if you tried everything then do this. Go to Task Manager, and click on the Services tab. Disable all of the Hyper-V services (Anything usually with "Hyper V" or "HV". image image image This just stops the processes and can only be brought back manually if triggered. You can fully disable the Hyper V services if you click on the Open Services tab on the bottom of the task manager. image image

Once you done that. Try to restart your computer and see if it works. If it still hasn't worked, then look in your services or processes to see if you missed any running services that are in the background.

Had the same issues, tried all solutions here. Disabling all the Hyper-V services and rebooting worked for me! 🙏🏽

L96Github commented 3 years ago

Update: I tracked the issue down to having the "Isolated Browsing" setting enabled in Windows Security. It uses Application Guard which uses Hyper-V under the hood (even tough Hyper-V is disabled in windows features.

So, if you still have this issue be sure to check that "Windows Defender Application Guard", "Hyper-V" and "Windows Hypervisor Platform"are all disabled in the Windows Features window. image

SlaughterBlade commented 2 years ago

I found some kind of trick that worked for me! Hope it will help you solve your problems too. At first I enabled Virtualization in the BIOS settings, but when I started Android emulation via Android Studio it failed to use hardware acceleration. I followed the instructions here:

Open an elevated (i.e. Run as administrator) Command Prompt.

bcdedit /set hypervisorlaunchtype off Also make sure HVCI (Windows Defender's memory integrity setting) is off. Reboot. but it didn't work.

Then I read the suggestion here: 45989491-8a2f5380-c0ae-11e8-9e62-e2fc17c55e0e and my tick has been disabled all the time.

I enabled it and restarted. When Windows restarted i ran Android Studio again, just to check it was sending the same error on screen and I got struck seeing that, instead, it was working!!!

So, what worked for me was:

  1. Running the command in the Command Prompt as Administrator
  2. Enable virtualization in the BIOS
  3. Check the following ticks were off 53020975-d1085600-3460-11e9-9220-df7d4d9d2ba8
  4. Enable this option here that was always disabled: 45989491-8a2f5380-c0ae-11e8-9e62-e2fc17c55e0e

Don't ask me why but now it works properly.

You Are Amazing it worked for me ! lol dont know why but I've been trying for 3 hours and this worked heheh.

arehman98 commented 2 years ago

Sorry for the very late reply. This is one of the posts I missed during my time off...

Besides HVCI, I'm not aware of anything else that can prevent Hyper-V from being turned off. One last try: there's a CLI way to disable Hyper-V, and it may work more reliably than the GUI way (Windows Features dialog).

  1. Open an elevated (i.e. Run as administrator) Command Prompt.
  2. bcdedit /set hypervisorlaunchtype off
  3. Also make sure HVCI (Windows Defender's memory integrity setting) is off.
  4. Reboot.

You beauty man , this worked instantly very well .. i have been looking for this solution for couple of days Thanks alot <3

fisforfaheem commented 2 years ago

weird issues...this should be fixed by google

skull-squadron commented 1 year ago

Encountered this issue and wasted 30 minutes on it.

The installer should mention HVCI needs to be disabled.

7.8.0 working on Windows 11 with Kaby Lake R.