Every KVM VM presents a virtual CPU with a set of features (AVX, AES-NI and so on). The KVM CPU model you choose decides which features guests see, which affects performance, software compatibility and whether live migration works between different hosts.
Before you start
- Root on the KVM host. Changes require a full VM power-off to apply.
- Know whether you need live migration across hosts with different CPUs; see KVM live migration.
The options
| Mode | Guest sees | Migration | Use |
|---|---|---|---|
host-passthrough | The host CPU almost exactly | Only to identical CPUs | Max performance, nested virtualization, single-host or uniform clusters |
host-model | A named model closest to the host, plus extra flags | To same or newer CPUs | Good default on mixed but similar hardware |
| Named model (custom) | A specific generation (e.g. a Skylake or EPYC variant) | Any host that supports it | Mixed clusters with predictable features |
| x86-64-v2/v3/v4 levels | A baseline feature level | Broad | Simple cross-vendor compatibility |
| qemu64 / kvm64 (old defaults) | Very old baseline | Everywhere | Avoid; modern OSes and apps may be slow or fail |
Why it matters
- Some modern distributions and software require newer features (for example x86-64-v2 or AVX). An ancient CPU model can make them refuse to run or run slower.
- Crypto and compression performance improves with AES-NI, AVX2 and similar instructions.
- Live migration fails if the destination lacks a feature the guest is using.
Set the model in libvirt
<cpu mode='host-passthrough' check='none' migratable='on'/>Or a named model:
<cpu mode='custom' match='exact'>
<model fallback='forbid'>EPYC-Rome</model>
</cpu>With virt-install use --cpu host-passthrough or --cpu EPYC-Rome. In Proxmox VE set Hardware → Processors → Type, where x86-64-v2-AES or newer levels are offered as defaults.
Find a common model across hosts
virsh domcapabilities | grep -A20 "mode name='host-model'"Collect CPU definitions from each host and compute a baseline with virsh hypervisor-cpu-baseline to get a model every host supports.
Check what the guest sees
lscpugrep -o -w -E 'avx2|aes|vmx|svm' /proc/cpuinfo | sort -uTroubleshooting
- Guest fails with "CPU ISA level is lower than required": the model is too old; use host-model, a newer named model or x86-64-v2+.
- Migration error about CPU features: use a common named model instead of passthrough.
- Nested virtualization not available: vmx/svm is hidden; use host-passthrough; see nested virtualization.
Frequently asked questions
Which is fastest?
host-passthrough, though the difference to a good named model is often small.
Can I see my VPS's CPU model?
Yes, with lscpu; the provider chooses it.
Does changing the model need a reboot?
A full power-off and start of the VM.
