"/dev/kvm not found "error on windows in android studio
I have enabled the Virtualization in BIOS in windows and I have Intel HAXM installed as well but I still get the message when I run the application on the emulator. How to resolve this. I am stuck at the same error for last two days.
Solution 1:
Remove intel haxm installer 6 from control panel>Add or remomve Program. And download manually from here. https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
Then install it manually. And launch android studio again. This worked for me. Hope it helps.
Solution 2:
Here are 4 simple steps that should work:
Uninstall Intel Hardware Accelerated Execution Manager version from Windows Control Panel
Go to https://github.com/intel/haxm/releases
Download older version (v7.1.0)
Install from zip
Solution 3:
I faced this issue and after some investigation, I concluded that the problem lies with the installer for HAXM and the way it is used.
Following is how I got it to work:
- uninstall previous instance of HAXM from control panel if any.
- download HAXM from here.
- extract downloaded zip.
"haxm-windows_v6_0_1.zip"
in my case.
Step 4, 5, 6 can be skipped they just provide some data points for entire process
-
try running intelhaxm-android.exe.
At this step I got error
"Failed to configure driver: unknown error. Failed to open driver"
this seems to be issue with installer itself. -
now I tried running
"silent_install.bat"
.this installs HAXM but original error
"/dev/kvm not found"
persist. I believe this is the file which android studio uses to install HAXM but this does not lead to a healthy installation as original installer have some issue. uninstall HAXM again.
extract
intelhaxm-android.exe
using winzip or any other program.-
go to extracted folder (
"intelhaxm-android"
in my case) and locate"hax64.msi"
now we need to extract this file, win zip does not support this so I went with command prompt, other programs such as 7zip may support this.
run command prompt in administartor mode (go to start > type cmd in search box > right click on cmd.exe > select run as administrator)
-
run following command :
##>msiexec /a <path\to\file>\hax64.msi /qb TARGETDIR=<path\to\target>\hax64
in my case it looks like
C:\Windows\system32>msiexec /a D:\Intel_HAXM\intelhaxm-android\hax64.msi /qb TARGETDIR=D:\Intel_HAXM\intelhaxm-android\hax64
this will extract "hax64.msi"
-
now open command prompt in admin mode (refer step 9) and navigate to
<newly extracted folder>\Intel\HAXM
in my case it is
"D:\Intel_HAXM\intelhaxm-android\hax64\Intel\HAXM"
-
now run following command:
##> HaxInst64.exe /i intelhaxm.inf 1
this should result in a success message at the end, something like this:
SUCCESS: installed package D:\Intel_HAXM\intelhaxm-android\hax64\Intel\HAXM\intelhaxm.inf.
-
go back to folder we have extracted in step 7
in my case :
D:\Intel_HAXM\intelhaxm-android
run setup.exe, setup should complete without any error this time.
additionally I had to delete the existing AVD and create a new one as existing one was acting weird.
References:
- HAXM installer issue
- Extracting msi package from command line
- Json's Answer