Kvm + Virtmanager
Note: This guide was tested on Ubuntu 22.04 and 24.04 Source: How to Install KVM on Ubuntu 20.04 This is a work in progress
Step 1
- Check if virtualization is supported using the commands:
egrep -c '(vmx|svm)' /proc/cpuinfo
This command should return any number greater than 0 - Install cpu checker:
sudo apt update && sudo apt install cpu-checker
- Check if your system supports KVM
sudo kvm-ok
This should return the following output:INFO: /dev/kvm exists KVM acceleration can be used
Step 2
- Install KVM and other dependencies:
sudo apt install -y qemu qemu-kvm libvirt-daemon libvirt-clients bridge-utils virt-manager
- Enable the virtualization daemon:
sudo systemctl status libvirtd
- Check if the kvm modules are running:
lsmod | grep -i kvm
- This should return the following output (similar):
kvm_amd 208896 0 kvm 1417216 1 kvm_amd ccp 155648 4 kvm_amd
- Add your user to the necessary groups. This will allow qemu to use iso files:
sudo usermod -aG libvirt-qemu $USER
andsudo usermod -aG libvirt $USER
- You can make virtual machines with virt-manager now. The process is similar to Virtualbox.
- If you get an error message in virt-manager that reads:
QEMU/KVM - Not Connected
, reboot.
Pending on this guide:
- Add steps to create virtual machines graphically and via the command line
- Add steps to export virtual machines
- Add steps to create snapshopts and install spice tools