9

I installed Android Studio on Azure VM and installed all the prerequisites. When I try to run the emulator, I get the following error

enter image description here

When I try to install HAXM, I get the following error:

enter image description here

I checked that my Azure VM runs on AMD Processor. Is there any way, that I can make Android Emulator run on Azure Virtual Machine?

David Makogon
  • 69,407
  • 21
  • 141
  • 189
Rohit Jain
  • 307
  • 1
  • 3
  • 10

5 Answers5

7

Something that requires virtualization isn't going to run in an Azure VM (which is already virtualized). Same thing with, say, WP8 emulator (see this question, with the same answer).

EDIT - As of mid-2017, there are now VMs that support nested virtualization (Dv3 and Ev3 series, for now). See this post for more information.

David Makogon
  • 69,407
  • 21
  • 141
  • 189
  • does this change with windows server 2016? – TWilly Oct 16 '16 at 04:49
  • What about creating Azure VM with Android VM? Is that completely crazy or worth trying? – ap3rus Dec 29 '16 at 19:40
  • To be more specific, you can't run Android emulators because nested virtualization is not enabled on Azure. Other than that, it is perfectly normal to run a virtualized system inside of another virtualized system on any modern hypervisor and x86 CPU without any significant performance degradation. – toksaitov Jan 13 '17 at 14:04
2

The Android emulator works with the following setup:

Azure VM: Windows 10 Enterprise N

Android Studio: 2.3.1

AVD Manager

Hardware: Phone -> Nexus 5X
System Image: Other Images -> Nougat 25 armeabi-v7a [Android 7.1.1]

Start the emulator and wait about 5-10 minutes for the process to complete. Then run your Android app by attaching it to the running emulator. Note that "Apply Changes" (lightning bolt icon) also works for small code changes.

tanda8
  • 61
  • 1
  • 1
  • 4
1

If you set the CPU of the emulator to armeabi-v7a it will work (albeit very very slowly). Tested with Rev 25. I assume this works because it doesn't use virtualization, but rather CPU Emulation.

nwaltham
  • 2,067
  • 1
  • 22
  • 40
0

As of mid-2017, there are now VMs that support nested virtualization (Dv3 and Ev3 series, for now). Still, I couldn't run the Android virtual device(AVD) created in the android studio. But, below solution worked for me:

  1. Check if Azure VM supports nested virtualization.
  2. Enable hyper-v in VM as mentioned here 1.
  3. Use Visual Studio Emulator. Visual studio emulator definitely works on azure VM.
Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
0

Forget about enabling nested virtualization or else. All you have to do is:

  1. Disable Hyper-V
  2. Install Mumu emulator.

And you'll see emulator working on your VM.

leonheess
  • 16,068
  • 14
  • 77
  • 112
NHK
  • 1