How to install KVM server on Debian 9/10 Headless Server

To install KVM server on a Debian 9/10 headless server, follow these steps:

  1. Install the required packages:
    sudo apt-get update
    sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virtinst -y
  2. Add your user account to the libvirtd group:
    sudo adduser $USER libvirtd
  3. Verify that the KVM module is loaded:
    lsmod | grep kvm
  4. Start the libvirtd service:
    sudo systemctl start libvirtd
    sudo systemctl enable libvirtd
  5. Verify that the libvirtd service is running:
    sudo systemctl status libvirtd
  6. 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.

Leave a Comment