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).

7 Answers7

83

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,196
  • 1
  • 13
  • 11
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,031
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,186
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.

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,316
Hong
  • 191
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,504
drkpeezy
  • 11
  • 1