3

I have an AMD CPU, with Windows Server 2019 (dont ask why), where I enabled Hyper-V. However, in my (stable channel) Android Studio, it still says

Unfortunately, your computer does not support hardware accelerated virtualization. Here are some of your options:

1) Use a physical device for testing

2) Develop on a Windows/OSX computer with an Intel processor that supports VT-x and NX

3) Develop on a Linux computer that supports VT-x or SVM

4) Use an Android Virtual Device based on an ARM system image (This is 10x slower than hardware accelerated virtualization)

Is it that the Hyper-V enabled emulator option only available in the beta channel of Android Studio? How to enable hardware acceleration for Android Emulator in Windows Server 2019?

Siddharth Venu
  • 1,318
  • 13
  • 26
  • posible duplicate see https://stackoverflow.com/questions/37475012/i-am-getting-this-error-your-cpu-doesnt-support-vt-x-or-svm-android-studio-2 – Mihai Jun 30 '19 at 17:18
  • @Mihai not a duplicate - since then, Android Emulator received support of Hyper-V, not so at the time of that post. – Siddharth Venu Jun 30 '19 at 17:21
  • did you read this https://developer.android.com/studio/run/emulator.html – Mihai Jun 30 '19 at 17:30
  • what version of android studio and emulator do you use? What AMD CPU does it suport AMD-V, SVM ? – Mihai Jun 30 '19 at 17:31
  • I used both latest stable and latest beta. Ryzen 3 is my CPU and I enabled SVM through UEFI. Do see my answer below, it worked after running a command in PowerShell. – Siddharth Venu Jun 30 '19 at 17:34
  • for AMD cpu on windows you need need WHPX and it seems windows server 2019 does not suport it read here about it https://learn.microsoft.com/en-us/virtualization/api/ – Mihai Jun 30 '19 at 17:35
  • WHPX is supported in Win Server 2019, though you have to enable it through PowerShell. Read my answer to this question. – Siddharth Venu Jun 30 '19 at 17:37
  • I saw it now, nice that you found the answer it might help other people as well. – Mihai Jun 30 '19 at 17:38

1 Answers1

5

After an hour of searching, I've found that Hyper-V and Windows Hypervisor Platform (WHPX) are not the same. While you can enable Hyper-V through GUI in Windows Server 2019, you can't do the same for WHPX. Aside from enabling Virtualization in BIOS and Hyper-V through the GUI mode, to enable WHPX on Windows Server 2019 (and possibly other Server editions), run the following command in PowerShell with elevated permissions:

Dism /Online /Enable-Feature:HypervisorPlatform

It is working after running the command, even without a restart.

Siddharth Venu
  • 1,318
  • 13
  • 26