Click here to Skip to main content
15,503,579 members
Articles / Mobile Apps / Android
Technical Blog
Posted 28 Apr 2020

Stats

39.6K views
2 bookmarked

Fix /dev/kvm is Not Found and Device Permission Denied Errors on Linux/Ubuntu 20.04/19.04

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
28 Apr 2020CPOL1 min read
Solutions to problems you'll encounter when creating new virtual devices
In this post, you will find solutions to problems encountered when creating new devices, namely /dev/kvm is not found and device permission denied errors on Linux/Ubuntu 20.04/19.04.

When working with Android SDK and Android Studio to develop mobile apps on your Linux Ubuntu 20.04, you often need to use emulators to test your apps. In this case, you will need to use an AVD (Android Virtual Device) to create a new device, but sometimes, you’ll encouter problems when creating new virtual devices with the /dev/kvm is not found and /dev/kvm device permission denied error messages.

What’s KVM and How to Enable It?

KVM stands for Kernel-based Virtual Machine and it’s a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).

Solving /dev/kvm is not found Error

You need to enable KVM, from the BIOS by pressing F1 key before the system boot. Next, go to the Security tab and enable Intel Virtualization Technology and Intel VT-d Feature. Save the new settings by pressing F10. Finally, exit and restart your computer.

Solving /dev/kvm device permission denied Error

After enabling KVM, you’ll likely have another error message that says /dev/kvm device permission denied

To fix this error. you need to install qemu-kvm and add your username to the kvm group.

Head over to your terminal and run the following command to install qemu-kvm:

sudo apt install qemu-kvm

Next, you need to add the user your-username to the kvm group using the following command:

sudo adduser username kvm

Next, in some cases, you also need to run the following command:

sudo chown username /dev/kvm

You can get your username using the following command:

whoami

Now, you can verify if your username is added to kvm group using the following command:

grep kvm /etc/group

If your user name is added. Finish by restarting your Ubuntu 20 system.

Next, follow the steps tp create a new AVD, to start using your Android emulator.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Comments and Discussions

 
SuggestionWhat I've used for this problem Pin
bence9817-May-20 12:30
bence9817-May-20 12:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.