“/dev/kvm not found ”error on windows in android studio
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"
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 (my org gives me winzip :| ) -
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.