$$ \Large \mathsf {Installing~KVM} $$
First of all, run the following command to check if the PC is compatible with KVM or not.
egrep -c '(vmx|svm)' /proc/cpuinfo
If the result shows 0 it means that your CPU doesn't support hardware virtualization.
If the result shows 1 or more then it does support KVM but you still need to make sure that virtualization is enabled in the BIOS.
Here my PC is showing 8, which means it supports virtualization and I have already enabled my virtualization previously from my BIOS. Now it is time to do the following steps one by one.
virt-manager
and virtinst
, which will install the GUI of the virtual manager. Virtual machines can be created and run using the command line, so if you want you can remove both of those commands and only install the essential components to run KVM.sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils
kvm-ok
command is typically used to check if the KVM virtualization extensions are available and properly configured on your system.This command should show something like the following screenshot, if you do not get the same output, run the installation command again.
kvm-ok
libvirt
and kvm
groups to grant the necessary permissions.sudo adduser $USER libvirt
sudo adduser $USER kvm
It will show something like this.
Here my$USER
is sakib_sadman
and as I had previously installed KVM on my machine, I had this user added to the libvert and KVM already. That is why it is showing already added, your one might show a different output.