tag
KVM
14 posts
Reading a libvirt Domain XML: The 20 Lines That Are Actually Your Decisions
virsh dumpxml prints 180 lines for one small VM. About twenty of them record choices you made; the rest are defaults. Here is how to tell which is which.
Why a VM Needs Two Firmware Files: AAVMF and OVMF Explained
A VM has no motherboard, so its UEFI firmware comes as files: one program shared by every VM, and one settings file per VM. Mix them up and a VM stops booting.
How a Computer Boots Before Any OS Exists: BIOS, UEFI, and GPT
At power-on a CPU knows nothing about disks or files. Firmware fills that gap, and its two generations explain most of what is confusing about booting.
What a libvirt VM Really Is: The XML File Behind Every Tool
Behind virt-install, virsh and virt-manager, a libvirt VM is one XML document that points to its disk and firmware files. Here is what that means.
virt-install Explained: Every Flag for an arm64 Guest
The command that builds a Debian guest on a Raspberry Pi 5 has 14 options, answering seven questions. Learn the questions, and write the next command yourself.
Fixing virt-install on arm64: Security Violation, dnsmasq Port 53, and the qemu:///session Trap
The virt-install command in most ARM64 guides is correct, and it still fails, for four reasons that come from defaults rather than the command. Here is each.
Installing the KVM Stack on Raspberry Pi OS: What Each Package Does
Nine packages, three layers. Then virt-host-validate reports four warnings and three failures on a healthy system. Here is how to read every line.
How to Check KVM Is Enabled on Raspberry Pi 5 (/dev/kvm, lsmod, dmesg)
Three commands confirm your host can run accelerated VMs, and one of them returns nothing on a Raspberry Pi, for a reason that confuses a lot of people.
Why VirtIO Is Faster Than Emulated Devices: Virtqueues and vhost-net Explained
Emulated devices are slow because they faithfully imitate hardware never designed for software. VirtIO throws that away, and lets the guest cooperate instead.
What ioctl(KVM_RUN) Does: The VM Exit Loop Explained
One system call, ioctl(KVM_RUN), repeated in a loop, is what running a virtual machine physically is. This post looks closely at it, and at the VM exit loop.
How QEMU Emulates Hardware: Device Models, MMIO, and TCG
Every device your guest sees is C code responding to memory addresses. Once you see the trick, QEMU stops being mysterious, and its performance predictable.
KVM vs QEMU vs libvirt: Who Does What
Three pieces, one running VM. Each exists because of a specific gap the layer below it leaves, which is a better way to learn them than three definitions.
Why KVM Needs the CPU: ARM64 EL2, VHE, and the Virtualization Extension
KVM is part of the Linux kernel, but virtualization is a hardware feature. How those two relate is where most people's understanding of KVM breaks down.
What a Hypervisor Is, and Where KVM Fits (Type-1 vs Type-2)
What a hypervisor is, why KVM does not fit the usual Type 1 versus Type 2 categories, and what it inherits from being part of the Linux kernel.