To install KVM server on a Debian 9/10 headless server, follow these steps:
- Install the required packages:
sudo apt-get update
sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virtinst -y
- Add your user account to the libvirtd group:
sudo adduser $USER libvirtd
- Verify that the KVM module is loaded:
lsmod | grep kvm
- Start the libvirtd service:
sudo systemctl start libvirtd
sudo systemctl enable libvirtd
- Verify that the libvirtd service is running:
sudo systemctl status libvirtd
- Connect to the local libvirtd instance:
virsh connect qemu:///system
Now that KVM is installed, you can start creating and managing virtual machines using tools like virt-install
and virsh
.