How to install KVM for Android Studio in Manjaro
How to install KVM (kernel based virtual machine) for Android Studio in Manjaro.
1. Check if your machine supports virtualization
Use the following command:
LC_ALL=C lscpu | grep Virtualization
It will return something like this:
Virtualization: VT-x
2. Check kernel support
$ zgrep CONFIG_KVM /proc/config.gz
It will return something like this:
CONFIG_KVM_GUEST=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
CONFIG_KVM_VFIO=y
CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
CONFIG_KVM_COMPAT=y
CONFIG_KVM_XFER_TO_GUEST_WORK=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
CONFIG_KVM_AMD=m
CONFIG_KVM_AMD_SEV=y
CONFIG_KVM_XEN=y
CONFIG_KVM_MMU_AUDIT=y
3. Install the KVM package and its dependencies
$ sudo pacman -S qemu virt-manager openbsd-netcat bridge-utils vde2 iptables dnsmasq
It will ask:
:: There are 3 providers available for qemu:
:: Repository extra
1) qemu-base 2) qemu-desktop 3) qemu-full
Enter a number (default=1):
I usually choose the option 2
.
4. Start libvirtd
$ sudo systemctl start libvirtd.service
5. If it has not given problems, enable the service
$ sudo systemctl enable libvirtd.service
6. Edit the configuration file /etc/libvirt/libvirtd.conf
$ sudo nano /etc/libvirt/libvirtd.conf
7. Uncomment the following lines
unix_sock_group = "libvirt"
unix_sock_ro_perms = "0777"
unix_sock_rw_perms = "0770"
8. Add your user to the group libvirt
$ sudo usermod -a -G libvirt miguel && newgrp libvirt
9. Restart the service libvirtd
$ sudo systemctl restart libvirtd.service
And KVM would already be installed and running.
Source: computingforgeeks.com
Header image from Jupiter Images .