Search code examples
android-studioandroid-emulatorwindows-10esxixendesktop

Run Android Emulator on Windows 10 with XenDesktop on VM on ESXiHost?


The standard computer lab setup at the school where I work is for the students to connect to a Windows 10 image running XenDesktop on an ESXi host via Citrix Receiver.

We'd like to add Android development to our virtual computer lab, but none of the emulators I've tested will run. Here's what I've tried and the results:

  • Android ADB that come with Android Studio: Not compatible with Hyper-V, so Hyper-V turned off and ADB hangs with message "Cannot get ADB Version" or similar
  • Microsoft Visual Studio Android Emulator: It hung when trying to start AVD with message "Starting OS" on AVD. After an hour, I tried to close it and AVD message changed to "Closing operating system" and hung there. I finally closed it with Task Manager.
  • GenYmotion: It hung when trying to start the AVD. The AVD was an empty window frame.

Has anyone attempted something like this?


Solution

  • The solution turned out to be relatively simple. Use the vSphere 6 Web Client to edit the VM settings, and on the CPU settings, enable "Expose Hardware assisted virtualization to guest OS" (the standalone vSphere client does not have this option). Then restart the VM, install HAXM on the VM, restart the guest OS, and then Android studio and emulator will allow x86 AVDs as usual.