Visual Studio 2017 Android Device Manager thinks WHPX is not properly installed

18k views Asked by At

I just update Visual Studio 2017 to version 15.8.0, the one that I've been waiting for a while now, due to its support for Hyper-V accelerated Android emulators using Windows Hypervisor Platform (WHPX).

I've been running Windows 10 version 1803 since May, and I have installed/enabled Windows Hypervisor Platform from "Turn Windows features on or off". Also, I have updated Android SDK and tools as it's described in https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration.

However, when I run any of the accelerated emulators, I get an error:

We've encountered an error with your Windows Hypervisor Platform (WHPX) configuration that is preventing us from running your emulator accelerated.

Please ensure WHPX is properly installed, then perform a factory reset on the emulator and try again.

No log and nothing else. Hence, I'm a bit confused and don't know what I should do next.

Appreciate any help.

P.S. Couple of clarifications:

  • I tried both, resetting existing emulators and creating new ones.
  • I run Hyper-V virtual machines and Docker containers on the same PC.
5

There are 5 answers

1
CoderBlue On

It may be that your CPU does not support virtualization or some other software is preventing its use. If you have an Intel Processor Intel's VTx support page is an excellent resource to determine if your CPU permits virtualization and/or if some other software is preventing its use:

In summary:

  1. Identify Your Intel CPU and View the Specs
  2. Use the Intel Processor Identification Utility (https://www.intel.com/content/www/us/en/support/articles/000005495.html).
  3. As the first link points out, even if the Intel tool in #2 shows VTx not supported, check TaskManager to see if Virtualization is enabled. If it is, then some other software is using Virtualization and preventing the tool (and other tools similar to it) from showing Virtualization as enabled.
  4. Using both Intel's utility and TaskManager you can diagnose the problem per Intel's Table:

Virtualization Checked in Intel Utility + Virtualization Enabled in TaskManager -> enabled, usable

Virtualization Checked in Utility + Virtualization Disabled in TaskManager -> disabled in BIOS.

Virtualization Checked in Utility + Virtualization Enabled in TaskManager -> enabled but used by other software

Virtualization Checked in Utility + Virtualization Disabled in TaskManager -> Virtualization not supported .

1
user2862910 On

I received this error even though I was already successfully running docker containers as well.

It turns out that I didn't have Windows Hypervisor Platform enabled in the "Turn Windows Features On and Off" menu. Once I turned it on, the error disappeared.

I had both Hyper-V options enabled but not Windows Hypervisor Platform. I guess that one is not required to run docker containers.

14
Kayvan Karim On

Maybe the Virtualisation is not enabled for your CPU from the BIOS menu. Boot to your BIOS and Enable Virtualisation. Also, install or reinstall these features on windows. enter image description here

1
M. Hamza Rajput On

Work with visual studio 2019

I fixed this issue by disabling "Windows Hypervisor Platform" and only enable "Hyper-V" option.

2
Tenek On

Running from VS2019 gives me the same WHPX error. But running manually works just fine with hardware acceleration (make sure you run powershell as administrator):

PS C:\Program Files (x86)\Android\android-sdk\emulator> .\emulator.exe -avd <avd_name> -feature WindowsHypervisorPlatform