(Android) Emulator on Hyper-V

An apparently great news is that Microsoft has been cooking up an Android emulator. It appears that every company now feels compelled to create one. Right now we have Google’s emulator, Intel HAXM support for it, Genymotion, Xamarin Android emulator and now the Visual Studio’s one. It is getting crowded, isn’t it?

So, why I did write an apparently great news. Because the VS Android emulator, just like Windows Phone emulator, runs on top of Hyper-V. Which is not bad from the technical point of view but it is certainly not a good option on a developer machine. And that’s because turning on Hyper-V means that no other virtualization host can coexist. That’s right, forget about VMWare Workstation and Virtual Box when Hyper-V is turned on. Which makes sense on a server but on a developer machine it is sort of silly. The solution? According to Hyper-V crowd it is simple:

Just reboot with Hyper-V turned on or off, depending on your needs.

Which is … silly and really annoying. Heck, even Microsoft acknowledges this problem and it even lists it as one of the motivations beneath Visual Studio’s Emulator for Android:

Conflict with Hyper-V on Windows. Many emulators require you to disable Hyper-V or don’t work as well with Hyper-V as they do without. Using Hyper-V is part of the development setup for many developer activities, so asking you to restart your machine (multiple times a day) to toggle Hyper-V is not acceptable.

I agree that switching Hyper-V on and off is not acceptable. Bot nor is this solution. Instead of getting rid of (or modifying) Hyper-V when it comes to emulators, Microsoft decided to start creating all sort of emulators based on Hyper-V instead. Which is somehow conflicting with the awesome direction of open sourceness and multi platforms MS recently took. On the one hand they are going all nuts with open source and collaboration with other OS (amazing, btw) while on the other hand they are trying to monopolize virtualization on workstation machines. In the times when a mobile developer has to work with all sorts of different tools and software!

Other issues with the Hyper-V based emulator are that they require SLAT support (won’t run on older CPUs) and that they require Windows 8.x Pro or better. Both VMWare Workstation and Virtual Box run on “every” Windows you throw at them. Ah, and don’t forget that it will hardly support Google Play out of the box due to the Google’s silly restrictions (no emulator is allowed to ship Google Play except Google’s own).

So, the bottom line is, that yet another Android emulator is welcome, but it could be done much better. I’ll probably stick with Genymotion for the time being, since it works regardless of Hyper-V and is more feature packed that the rest.

2 thoughts on “(Android) Emulator on Hyper-V

  1. Apparently you do not understand the underlying nature of how hypervisors work. Any true hypervisor, such as VMWare ESXi or Hyper-V, uses virtualization functions built into the CPU, and the hypervisor must have exclusive access to these functions. So any two hypervisors will be completely incompatible with each other. Furthermore, since many emulators utilize these same virtualization functions to improve performance, they will also be incompatible with various hypervisors. Some client hypervisors and desktop emulators can bypass the requirement for these CPU virtualization functions, allowing them to run on a virtualized host OS, but then performance approaches 0 and many emulated devices will just fail to boot.

    It's not hyper-v that you're complaining about. It's the fact that you're using disparate virtualization applications, hyper-v just happens to be in the mix, and your own bias against Microsoft lends you to believe that it's Hyper-V causing problems when in fact it's just you. Were you to attempt the same setup using Parallels and VMWare workstation, you'd have the same problem. The solution is to use only a single virtualization application, and Microsoft has made it possible to choose theirs.

    1. Well, VMWare Workstation, Virtual Box and Android Google emulator would work on desktop just fine. All of them. They don't block others on *desktop*. If I suffer from a small penalty, so be it (which I doubt anyway – Workstation tends to be faster than Hyper-V on desktop, or at least it used to be).
      You are correct that it's a true hypervisor the culprit here. I'm not blaming Hyper-V being a bad product or anything, I blame the decision to put a true hypervisor (aka Hyper-V) on desktop and thus killing all the others.
      At the end I wouldn't care today if I had a working and up-to-date Android emulator….

Leave a Reply