/dev/kvm not found on mac

2019-02-17 08:05发布

问题:

So I've been working with android studio 2.0 beta on my Mac and AVD was working fine.

But then I notice that android studio can't launch AVD now. It says /dev/kvm not found. enable VT-x in your bios security settings, ensure that your linux distro has working kvm module.

The thing is: I didn't touch bios settings at all. Possible causes :

  • VMWare - I was playing with virtual machines and configuring new networks for vm's just before I noticed the error.
  • CleanMyMac - I also used this app to clean the system
  • other causes are possible, but I never entered BIOS or touched system settings

The solutions on resolving this issue I found all refer to Linux, rather than Mac. How would I fix this?

EDIT:

I reinstalled OS X (without formatting hard drive). That didn't work.

回答1:

Just remove the previous HAXM and install IntelHAXM_6.0.3.dmg in haxm-macosx_v6_0_3.zip

here is download link haxm-macosx_v6_0_3.zip

its work for me!



回答2:

Here is the solution that worked me.

Well, Android Studio need HAXM to run emulator.

The issue is that the HAXM drivers doesn’t support the beta version of Mac Os High Serria yet.

The driver works but with a little bit of additional command.

First, you will need to disable the Security Protection on kext. The drivers is not sign for this version.

From https://apple.stackexchange.com/a/269777:

  1. Get into Recovery Mode by restarting and holding down ⌘+R until Apple logo appears.
  2. In the top menu click Utilities > Terminal.
  3. In the Terminal window type and press Enter:

    csrutil enable --without kext

  4. Then restart the Mac.

Then you can install HAXM from:

Download the driver from here https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager/ and unzip it.

Open a terminal and go to the directory of the driver :

cd Downloads/haxm-macosx_v6_2_0
# edit the file and look for 10.12
nano silent_install.sh
CTRL + W
10.12

Add 10.13 after 10.12, and save the file ( CTRL+X, Y, ENTER)

Run it:

./silent_install.sh

To be sure it works:

sudo kextload -bundle-id com.intel.kext.intelhaxm

Now your emulator should work !



回答3:

/dev/kvm not found on mac.

Follow the steps. You can solve your problem.

Step1: Download Intel HAXM from software.intel.com.

Step2: Extract and Open the file name like “IntelHAXM_6.2.1.dmg”.

Step3: Double click on “IntelHAXM_6.2.1.mpkg” to Install manually.

Step4: Read and Install carefully.

Step5: When you receive Security warning for new extension goto system preferences and Click “Allow” button.

Step6: That’s it. Now you can run the emulator.

(Note : Incase you get same error again. Please Re-Install the “IntelHAXM_6.2.1.mpkg” Once again. That’s really fix your problem.)

Happy coding... :-)



回答4:

Enter your VM settings and then search for virtualization engine : Check the virtualize Intel VT-x/EPT or AMD-RVI option. This should resolve the problem.



回答5:

Your MacOS need to enable Intel VT-x

Reference: enable Intel VT-x