The kernel component of KVM is included in mainline Linux (as of 2.6.20) and the userspace component is included in mainline QEMU (as of 1.3).
Just like VMware ESXi and XenServer, it requires a CPU that supports hardware virtualization so that it can run VMs at near native performance.
KVM only works with a CPU that supports hardware virtualization. You can check if your CPU is supported by installing cpu-checker and running the kvm-ok command.
sudo apt install cpu-checker -y
The output of kvm-ok should be
INFO: /dev/kvm exists
KVM acceleration can be used
If the output says “KVM acceleration can be used” then we are good to go. If your system supports hardware acceleration and its not enabled in the BIOS, you should see a message like:
INFO: /dev/kvm does not exist
HINT: sudo modprobe kvm_amd
INFO: Your CPU supports KVM extensions
INFO: KVM (svm) 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
How to Install KVM on Ubuntu 18.04 LTS Server
Run the following commands to upgrade your system and then install KVM.