How can I get whpx or haxm to work with qemu on Windows host?

4.6k views Asked by At

I am trying to use qemu on a Windows machine to host Android x86. I am using the following command to start qemu:

qemu-system-x86_64.exe -vga std -m 2048 -smp 2 -soundhw ac97 -net nic,model=e1000 -net user -cdrom android-x86_64-8.1-r1.iso -hda android.img -accel haxm

I am having a problem enabling either whpx or haxm and no matter what I do the result is the same: qemu complains that -machine accel=haxm: No accelerator found. The same for whpx.

I made sure that intel virtualisation and vtx are enabled in the BIOS, I made sure that both Windows Hypervisor Platform and Hyper-V are installed from Turn Windows Features On or Off, I installed HAXM using the Visual Studio 2017 installer, using the Android Studio installer, using the standalone installer downloaded straight from Intel's webpage and nothing.

What I find amusing is that Android Studio and VS both were able to run their emulators just fine with either haxm or whpx enabled. It's just qemu that is stubborn.

What else should I do to be able to use either one of those? If I ommit the -accel command, qemu starts just fine but the performance is horrible.

Note that I did not have multiple versions of HAXM installed at the same time nor did I have Hypervisor enabled when trying to use haxm and vice versa.

1

There are 1 answers

0
Matthias On

The option to enable HAXM is -accel hax not -accel haxm

-machine accel=haxm: No accelerator found means QEMU doesn't know about the requested accelerator. If your HAXM would indeed not work the error would something like this:

Failed to open the HAX device!
Open HAX device failed