If you want to install KVM QEMU and Libvirt on Debian 12, this guide will help you step by step. We will use Debian GNU/Linux 12 (Bookworm) for all future examples in this series.
Therefore, make sure you install the correct Debian version. This ensures consistency across all tutorials.
Table of Contents
Step 1: Create a Debian 12 Virtual Machine
Before you install KVM, you need a working Debian system.
You can create a VM using:
- UTM (for macOS users)
- VirtualBox (for Windows users)
- Proxmox VE (if you already have a home lab server)
However, if you already run Linux on bare metal, you can skip this step.
Minimum VM Requirements
Use the following minimum specifications for Debian GNU/Linux 12 (Bookworm):
| Resource | Minimum Requirement | Recommended |
|---|---|---|
| CPU | 2 vCPU | 4 vCPU |
| RAM | 2 GB | 4 GB |
| Storage | 20 GB | 40 GB |
| Network | NAT or Bridged | Bridged |
Because virtualization needs resources, avoid using less than 2 GB RAM.
Step 2: Install Debian GNU/Linux 12 (Bookworm)
Download and install:
Debian GNU/Linux 12 (Bookworm)
Choose:
- Standard system utilities
- SSH server (recommended)
After installation, update the system:
sudo apt update && sudo apt upgrade -y
This ensures your system has the latest security updates.
Step 3: Verify CPU Virtualization Support
Before you install KVM QEMU and Libvirt on Debian 12, check CPU support.
Run:
bxtgeek@Orion:~$ egrep -c '(vmx|svm)' /proc/cpuinfo
2
If the output is 1 or higher, virtualization is supported.
If you see 0, enable virtualization in BIOS or UEFI.
Step 4: Install KVM, QEMU and Libvirt
Now install the required packages:
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virtinst -y
This installs:
- KVM kernel module
- QEMU hypervisor
- Libvirt service
- Network bridge utilities
- VM creation tools
After installation, enable and start libvirt:
sudo systemctl enable libvirtd
sudo systemctl start libvirtd
Then verify:
sudo systemctl status libvirtd
Step 5: Add Your User to Libvirt Group
To avoid using sudo every time, add your user:
sudo usermod -aG libvirt $USER
sudo usermod -aG kvm $USER
Log out and log back in.
Because of this, you can manage VMs without root privileges.
Step 6: Verify Installation
Check KVM support:
virsh list --all
If no error appears, the setup works correctly.
You can also verify:
lsmod | grep kvm
If you see kvm_intel or kvm_amd, KVM is active.
What Happens After Installation?
When you install KVM QEMU and Libvirt on Debian 12:
- KVM provides hardware acceleration
- QEMU runs virtual machines
- Libvirt manages everything
- Virsh allows CLI control
Therefore, you now have a complete virtualization stack.
FAQ Section
Because all future examples in this series use Debian 12.
Yes. However, commands may differ slightly.
No. You can manage everything using the terminal.
Yes, but 4 GB provides better performance.
Yes. However, nested virtualization must be enabled.
Conclusion
In this guide, you learned how to install KVM QEMU and Libvirt on Debian 12 (Bookworm). You also created a proper virtual machine with minimum requirements.
Now your system is ready for virtualization. In the next article, we will create and manage virtual machines using virsh on Debian GNU/Linux 12.






[…] this guide, we will use Debian GNU/Linux 12 (Bookworm). All future examples in this series also use this […]
[…] this guide, we will use Debian GNU/Linux 12 (Bookworm). All future examples in this series also use this […]
[…] this guide, we use Debian GNU/Linux 12 (Bookworm). All future examples in this series use this […]
[…] this guide, we use Debian GNU/Linux 12 (Bookworm). All examples in this series use this […]
[…] this guide, we use Debian GNU/Linux 12 (Bookworm). All examples in this series follow this […]
[…] this guide, we use Debian GNU/Linux 12 (Bookworm). All examples in this series follow this […]
[…] this guide, we use Debian GNU/Linux 12 (Bookworm). All examples in this series follow this […]