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). 1 7 Answers
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 usedOutput like the below means,
INFO: Your CPU does not support KVM extensions
KVM acceleration can NOT be usedIn this scenario need to install KVM using the below command,
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utilsHope this helps.
3Either 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.
4HP-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 usedAffter bios setting, I used the following command
sudo modprobe kvm_intelNow is ok
2Worked on Ubuntu 15.04, Intel's CPU
sudo apt-get install qemu-kvm- Enable Virtualization Technology in BIOS
sudo kvm-ok
I had tried the command,
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utilsbut unfortunately it didn't work. Then I changed owner (rohanverma is user in my case) by using,
sudo chown rohanverma:rohanverma -R /dev/kvmwhich worked for me.
1I 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:
sudo apt install cpu-checker- In VMware, go setting->Processors->Virtualization Engine, check "Virtualize Intel VT-x/EPT or AMD-V/RVI.
sudo kvm-ok
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.
2