Linux Kernel Virtual Machine setup with QEMU/KVM

How to turn a Debian machine into a proper KVM hypervisor with bridged networking, managed via virt-manager over SSH.

So you want your own VM server, a proper one you control, not a rented cloud slice. Here is how to set up KVM on Debian 12, configure bridged networking so your VMs get real IP addresses on your LAN, and connect to it remotely with virt-manager.

Do not copy-paste the entire block below. Watch the video and follow along since the commands split across the host machine and your local PC, and order matters.

Install KVM on the host

# Install everything needed on the HOST machine
sudo apt install --no-install-recommends qemu-system libvirt-clients libvirt-daemon-system virtinst bridge-utils ovmf dnsmasq qemu-utils

# Add your user to the libvirt group
adduser <youruser> libvirt

# Verify KVM is operational
virsh list --all

Set up passwordless SSH from your local PC to the host

virt-manager uses SSH to connect to the remote libvirt daemon. Set this up before anything else.

# Run these on your LOCAL PC
ssh-keygen -t rsa -b 4096
ssh-copy-id darth@192.168.99.13

Once the key is in place, use this connection string in virt-manager:

qemu+ssh://darth@192.168.99.13/system

Configure bridged networking

By default, KVM uses NAT for guest networking. For VMs that need to be reachable on your LAN with their own IP, you need a bridge. Edit the network interfaces file on the host, remove the existing configuration for your physical NIC, and replace it with:

auto br0
iface br0 inet dhcp
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0

Replace eth0 with your actual NIC name. Then define and activate the bridge in libvirt:

sudo virsh net-start br0
sudo virsh net-autostart br0

Download a guest installer

Navigate to the directory where you want to store VM images and grab the Debian netinstall ISO:

sudo wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.9.0-amd64-netinst.iso

From here, create the VM through virt-manager as shown in the video.