Pcornel
Linux

Virtualization

Cheat sheet · https://pcornel.dk/topic.php?topic=2897

Back to the Topic

Answer

Linux virtualization with KVM uses the kernel as a hypervisor, QEMU to emulate devices, and libvirt (virsh, virt-manager, Cockpit) to manage VMs, storage pools and networks.

Remember

Check hardware support (VT-x/AMD-V enabled in firmware), that /dev/kvm exists and libvirtd runs. Use virtio devices for performance. Network VMs via a bridge for LAN access or libvirt's NAT network.

First checks

  • virsh list --all — VMs and state
  • virsh dominfo <vm> — CPU, memory, autostart
  • virsh domiflist <vm> / domblklist <vm> — NICs and disks
  • lscpu | grep -i virtualization — hardware virtualization support

Commands

virsh
Inspect and manage libvirt virtual machines, networks, storage pools and other hypervisor objects.

Verify in this order

CPU virtualization → kvm module → QEMU process per VM → libvirt manages → network/storage 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=2897

Confirmation

Confirm action

Continue?