Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

The Android Emulator says /dev/kvm is not found

Error/dev/kvm is not found

Short answer

The emulator wants a hypervisor and cannot find one. Run the emulator's own -accel-check first. On Linux the usual causes are KVM not installed or virtualization switched off in the BIOS. On macOS there is no KVM at all, and inside another virtual machine the emulator cannot run accelerated.

  • Applies to Android Emulator, Android Studio, Ubuntu 24.04, macOS
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Ask the emulator which hypervisor it can use. Replace the path with your SDK location. The answer differs per operating system, which tells you which cause below applies.

    $ANDROID_HOME/emulator/emulator -accel-check
  2. 2Match what you see, then jump to its fix

    1. 1-accel-check mentions Hypervisor.Framework, or a guide you followed tells you to install KVM or HAXMYou are on macOS, where KVM does not existFix
    2. 2kvm-ok says /dev/kvm does not exist, or the package is not foundKVM is not installed on LinuxFix
    3. 3The CPU lists vmx or svm, but /dev/kvm still does not appearVirtualization is switched off in the BIOS or UEFIFix
    4. 4Linux runs under VirtualBox, VMware, Docker or a cloud instance that does not expose virtualizationYou are running the emulator inside another virtual machineFix

What does the error look like?

  • /dev/kvm is not found
  • KVM acceleration can NOT be used
  • INFO: Your CPU does not support KVM extensions

Cause 1 of 4

You are on macOS, where KVM does not exist

1Check

On macOS the emulator uses Apple's built-in Hypervisor.Framework. Intel HAXM is no longer supported there since macOS 11. A message about /dev/kvm on a Mac usually comes from an old guide or a copied config.

sw_vers -productVersion
$ANDROID_HOME/emulator/emulator -accel-check

2Fix

Install nothing. Update the Android Emulator in the SDK Manager and use a system image that matches your chip: arm64-v8a on Apple silicon, x86_64 on an Intel Mac.

$ANDROID_HOME/emulator/emulator -list-avds

3Verify

-accel-check prints a line naming the Hypervisor.Framework.

$ANDROID_HOME/emulator/emulator -accel-check

Confirmed by developer.android.com

Did this fix it?

Cause 2 of 4

KVM is not installed on Linux

1Check

Install cpu-checker and check two things: whether the CPU lists virtualization flags and whether kvm-ok reports that acceleration can be used. An output of 0 from the egrep means the CPU has no hardware virtualization.

sudo apt-get install cpu-checker
egrep -c '(vmx|svm)' /proc/cpuinfo
sudo kvm-ok

2Fix

Install the KVM packages. The command below is the one for Ubuntu 18.10 and later.

sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils

3Verify

kvm-ok prints INFO: /dev/kvm exists and KVM acceleration can be used.

sudo kvm-ok

Confirmed by developer.android.com

Did this fix it?

Cause 3 of 4

Virtualization is switched off in the BIOS or UEFI

1Check

On PCs the virtualization extensions are often off by default. Intel calls the setting VT-x and AMD calls it AMD-V or SVM. The egrep count above is 1 or more when the CPU supports it.

egrep -c '(vmx|svm)' /proc/cpuinfo

2Fix

Enter the BIOS or UEFI setup, turn on the virtualization option for your CPU, save and boot again. The menu name depends on the vendor, so use the system vendor's documentation.

sudo kvm-ok

3Verify

After the reboot, kvm-ok reports that KVM acceleration can be used.

sudo kvm-ok

Confirmed by developer.android.com

Did this fix it?

Cause 4 of 4

You are running the emulator inside another virtual machine

1Check

A VM-accelerated emulator cannot run inside another VM such as one hosted by VirtualBox, VMware or Docker. It has to run directly on the host computer.

systemd-detect-virt
sudo kvm-ok

2Fix

Run the emulator on the host machine instead, or test on a physical device connected over adb.

adb devices

3Verify

The emulator starts on the host, or the physical device shows up as device in the list.

adb devices

Confirmed by developer.android.com

Did this fix it?

How do I stop it coming back?

  • Pick system images that match the CPU: x86_64 images on Intel or AMD, arm64-v8a on Apple silicon.
  • Do not follow HAXM or KVM guides on macOS; use the emulator's own -accel-check to see what it will use.
  • Keep the Android Emulator package updated in the SDK Manager.
  • On Linux build servers, use a host that exposes virtualization, or run tests on real devices.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

adb tcpip 5555 fails because no device is found

adb: more than one device/emulator

adb tcpip only works while the device is attached and listed by adb, because it tells the phone to start listening on port 5555.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.