Install Hyper-V and HAXM on the same machine

If you are into mobile application development and wanted to install both Hyper-V (Microsoft’s hardware virtualization component) and HAXM (Intel’s Hardware Execution Manager) on the same machine, chances are you probably faced an error on installing the second one after installing one. And who likes working on slow emulators when you can give them adrenaline shots using virtualization? Even though your computer supports virtualization, you might get an error saying you need to enable hardware assisted virtualization.

In my case, the error shown every time I installed HAXM was:

HAXM cannot be installed until VT-x is enabled

- Advertisement -

Intel HAXM installation error - This computer does not support Intel Virtualization Technology (VT-x)

 

But my computer obviously did support virtualization since I was running Hyper-V. The problem was that HAXM and Hyper-V couldn’t be installed at the same time. They both use hardware virtualization and only one can be active at a time since they both lock vt-x.

But I wanted a way which involved using both the virtualizations hyper-v and haxm. I did not want to completely disable one and work on the other only.

The solution to this problem was that I had to create a new boot entry to start Windows without hyper threading turned on in it. By doing so, I was able to resolve this error. I could have disabled Hyper-V altogether for this. But I had to do Windows Phone development at times too. Hence, I wanted both the options available on demand so as to be able to juggle between the two easily.

Essentially, what you have to do is edit your boot.ini file and add another option to start windows with Hyper-V turned off. Using this method, you can switch to the profile you want on boot, depending on whether you wish to do android development or Windows Phone development. Both emulators will be accelerated using the respective virtualization according to the entry selected.

Steps to do so are:

  1. Open command prompt in elevated mode (administrator privileges).
  2. Put in the command
    bcdedit /copy {current} /d “Windows with hypervisor”
    This step copies your current boot entry into a new one with a different name. You can name this profile to whatever you wish to, this is just the display name in the booting up section.cmd disable hyervisor
  3. You can then type in the next command as
    bcdedit /set “{current}” hypervisorlaunchtype off
    which sets the hypervisor off for the current boot entry and then you can install HAXM for android development on this boot entry.

So after these steps, you can decide which profile to load at boot and then work accordingly on Android or Windows Phone development. Let us know any alternative ways in comments if you have any!

Recent Articles

How to sort a Set in JavaScript

ES6 introduced the set data structure in JavaScript. But sets are not ordered abstract data structures. So there is no .sort() property...

Debugging CSS scroll using one simple style

I have been doing a lot of complicated front-end work off lately and that always brings me back to the class conundrum...

CSS :has a parent selector now

CSS now includes a :has selector that allows us to apply styles on the basis of what is happening inside an element....

How to fix “invalid active developer path” after MacOS update

If you are here, then you are getting an "invalid active developer path" error on running commands in the terminal after a...

Getting the value of an input element as a number without parseInt

Every once in a while, you come across something and you think, how did I not know this earlier? valueAsNumber is that thing...

Related Stories

2 Comments

Leave A Reply

Please enter your comment!
Please enter your name here

Hi there! Want some more knowledge?

Think that the knowledge shared is helpful? You might want to give our mailing list a try. We'll send you 2-4 emails a month, right when new posts come out.

Hi there! Want some more knowledge?

Think that the knowledge shared is helpful? You might want to give our mailing list a try. We'll send you 2-4 emails a month, right when new posts come out.