To install KVM (Kernel-based Virtual Machine) on a Debian 9 or 10 headless server, you can use the following steps:
sudo apt-get update sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
This will install the qemu-kvm
package, which provides the user-space component for running virtual machines using KVM, and the libvirt
package, which provides the management tools for KVM and other virtualization technologies.
libvirt
group:sudo adduser `id -un` libvirt
This will allow you to manage KVM virtual machines as a non-root user.
libvirtd
service to apply the changes:sudo systemctl restart libvirtd
virsh -c qemu:///system list
This should display a list of available KVM virtual machines on the system. If the command succeeds, it means that KVM is installed and configured correctly.