82

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).
Dessa Simpson
  • 647
  • 7
  • 19
praveen kumar
  • 1,309
  • 2
  • 10
  • 6
  • 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

80

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-bin ubuntu-vm-builder bridge-utils

Hope this helps.

BDRSuite
  • 3,126
  • 1
  • 11
  • 11
  • 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
  • 24
    `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
43

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
  • 37,033
  • 2
  • 68
  • 106
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
  • 27,106
  • 12
  • 74
  • 77
Allal
  • 181
  • 2
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
asilchenko
  • 111
  • 1
  • 2
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.

Rohan Kumar
  • 721
  • 5
  • 3
  • 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
3

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,306
  • 10
  • 26
  • 37
Hong
  • 191
  • 1
  • 1
  • 6
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,109
  • 4
  • 48
  • 98
drkpeezy
  • 11
  • 1
  • 1
    This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](http://askubuntu.com/questions/ask). You can also [add a bounty](http://askubuntu.com/help/privileges/set-bounties) to draw more attention to this question once you have enough [reputation](http://askubuntu.com/help/whats-reputation). - [From Review](/review/low-quality-posts/671553) – earthmeLon Jan 28 '17 at 00:37
  • 2
    @earthmeLon I fixed it. – wjandrea Jan 28 '17 at 02:07