libvirt
Cheat sheet · https://pcornel.dk/topic.php?topic=2900
Answer
libvirt is the management layer for KVM/QEMU: domains (VMs) defined in XML, storage pools and volumes, virtual networks, controlled with virsh, virt-install, virt-manager or Cockpit.
Remember
Edit VM definitions with virsh edit, not by hand. Mark VMs to start at boot with virsh autostart. The default NAT network (virbr0) needs ip_forward and libvirt's firewall rules.
First checks
virsh list --all— VMs and statevirsh dominfo <vm>— CPU, memory, autostartvirsh domiflist <vm> / domblklist <vm>— NICs and diskslscpu | grep -i virtualization— hardware virtualization support
Commands
virshvirsh list --allvirsh start web01virsh shutdown web01virsh destroy web01virsh autostart web01virsh dumpxml web01virsh edit web01virsh domblklist web01virsh domifaddr web01virsh console web01virsh snapshot-create-as web01 pre-upgradevirsh snapshot-list web01virsh net-list --allvirsh pool-list --allvirsh vol-list default
Verify in this order
XML definition → libvirt validates → starts QEMU with devices → networks and pools attached
Where it usually breaks
First mismatch in hardware/kernel capability → scheduler/mm/device → cgroup/namespace → process/thread → service/runtime → workload behavior/counters; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2900