CPU, memory, and device model
The domain XML describes a virtual machine contract: machine type, firmware, CPU compatibility, memory, and each presented device. Inspect the effective model CPU choices host passthrough exposes host CPU features closel
The domain XML describes a virtual machine contract: machine type, firmware, CPU compatibility, memory, and each presented device.
Inspect the effective model
virsh dumpxml guest01 --inactive
virsh domcapabilities --virttype kvm --arch x86_64
virsh hypervisor-cpu-baseline /root/cpu-models.xmlCPU choices
host-passthrough exposes host CPU features closely and usually maximizes performance. A named baseline model improves migration compatibility across unlike hosts. Choose based on the fleet, not one server.
Device defaults
- Prefer
virtiofor disks and network interfaces when the guest has drivers. - Use
q35for modern PCIe-oriented machine definitions unless compatibility requires an older model. - Treat firmware variables, TPM state, and NVRAM as data that must move with the guest.
- Pin emulator and vCPU threads only after measuring contention and NUMA placement.
Validate against host capabilities
An XML document can be syntactically valid but impossible on the target host. Compare machine types, CPU models, firmware paths, device support, and storage accessibility before define or migration.