KVM & QEMU Patterns
KVM and QEMU virtualization patterns I’ve actually used. Every entry has a date and context.
2026-03-07: VM Migration Between KVM Hosts (QEMU Binary Path)
Problem: Migrating WLC VM from kvm-01 to kvm-02 fails — QEMU binary path differs between hosts. Source uses /usr/bin/qemu-system-x86_64 (Arch/Ubuntu), destination uses /usr/libexec/qemu-kvm (RHEL/CentOS).
Context: WLC VM migration, different QEMU packages on source and destination hosts.
The Fix:
# Export XML from source host
virsh dumpxml vm-name > vm.xml
# Fix QEMU binary path for destination (use | delimiter for paths)
sed -i 's|/usr/bin/qemu-system-x86_64|/usr/libexec/qemu-kvm|' vm.xml
# Define and start on new host
virsh define vm.xml
virsh start vm-name
Rule: When migrating VMs between KVM hosts, check the QEMU binary path on the destination first. Use sed with | delimiter for path substitution (avoids escaping /). Common paths: /usr/bin/qemu-system-x86_64 (Arch, Ubuntu, Debian), /usr/libexec/qemu-kvm (RHEL, CentOS, Fedora).
Worklog: WRKLOG-2026-03-07