83

I'm using Ubuntu 14.04. I recently installed Android Studio, but whenever I try to run a Hello World app, I get this error:

/home/praveen/Android/Sdk/tools/emulator -avd Nexus_6_API_21 -netspeed full -netdelay none
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
CPU acceleration status: KVM is not installed on this machine (/dev/kvm is missing).
  • maybe u have a 32 bit system ,, try upgrading it n then try ... android emulator also requires 4gb ram and higher . – yunus Nov 18 '17 at 19:20

7 Answers7

84

Use the below command to check whether the KVM is installed in the machine or not,

kvm-ok 

Output:

INFO: /dev/kvm exists
KVM acceleration can be used

Output like the below means,

INFO: Your CPU does not support KVM extensions
KVM acceleration can NOT be used

In this scenario need to install KVM using the below command,

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

Hope this helps.

BDRSuite
  • 3,206
  • 2
    praveen@praveen-Lenovo-B590:~$ kvm-ok INFO: /dev/kvm does not exist HINT: sudo modprobe kvm_intel INFO: For more detailed results, you should run this as root HINT: sudo /usr/sbin/kvm-ok praveen@praveen-Lenovo-B590:~$ – praveen kumar Dec 24 '14 at 14:37
  • 27
    sudo apt-get install cpu-checker for kvm-ok. – Wtower Feb 03 '16 at 10:24
  • @vembutech after executing command kvm-ok I got an output that- "does not exist". So, I've installed it using the above mentioned command. It has been downloaded. Last line is Processing triggers for ureadahead (0.100.0-16) ... now I run the kvm-ok command again. But again it says "does not exist" – Prabs Feb 08 '16 at 12:24
  • libvirt-bin is no longer used: https://askubuntu.com/questions/1089753/e-package-libvirt-bin-has-no-installation-candidate – poleguy Jun 20 '22 at 14:07
44

Either your CPU does not support virtualization, or it is disabled in the bios. Go into your bios and see if you can find a setting to enable it.

psusi
  • 38,171
18
HP-EliteBook-820-G1:/opt/android-studio/bin$ sudo /usr/sbin/kvm-ok
INFO: /dev/kvm does not exist
HINT:   sudo modprobe kvm_intel
INFO: Your CPU supports KVM extensions
INFO: KVM (vmx) is disabled by your BIOS
HINT: Enter your BIOS setup and enable Virtualization Technology (VT),
      and then hard poweroff/poweron your system
KVM acceleration can NOT be used

Affter bios setting, I used the following command

sudo modprobe kvm_intel

Now is ok

chaos
  • 28,256
Allal
  • 181
11

Worked on Ubuntu 15.04, Intel's CPU

  1. sudo apt-get install qemu-kvm
  2. Enable Virtualization Technology in BIOS
  3. sudo kvm-ok
6

I had tried the command,

sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

but unfortunately it didn't work. Then I changed owner (rohanverma is user in my case) by using,

sudo chown rohanverma:rohanverma -R /dev/kvm

which worked for me.

  • This worked for me on Ubuntu 18. First had to enable on BIOS and then use chown as there was no permissions – HalfMens Sep 04 '20 at 20:23
4

I saw the same error. But I'm running Ubuntu on the VMware. Ubuntu is installed on the VMware. So the steps to resolve the problem is different from pure ubuntu machine. The complains went away with the following steps:

  1. sudo apt install cpu-checker
  2. In VMware, go setting->Processors->Virtualization Engine, check "Virtualize Intel VT-x/EPT or AMD-V/RVI.
  3. sudo kvm-ok
techraf
  • 3,316
Hong
  • 201
1

Close any other hypervisors before starting Android Studio. I received the same error message when I tried to run an Android Virtual Device and had a Virtual Box VM running at the same time.

wjandrea
  • 14,543