You are troubleshooting a KVM guest that fails to start with the error 'unsupported configuration: CPU mode 'host-passthrough' requires KVM'. Which of the following is the most likely cause?
Trap 1: The host CPU is too old and does not support the host-passthrough…
The host-passthrough mode does not depend on the CPU's age or specific features; it simply passes through the host CPU model. The limitation is not about CPU capabilities but about the hypervisor. Even an older CPU can use host-passthrough if KVM is available. Therefore, this is not the likely cause of the error.
Trap 2: The guest's XML configuration has a typo in the CPU mode attribute.
A typo in the CPU mode attribute would likely result in an XML validation error or an 'unknown CPU mode' message. The error specifically mentions 'host-passthrough' and 'requires KVM', which indicates that the mode is recognized but not supported by the current hypervisor. A typo would not produce this specific error.
Trap 3: The host CPU does not support hardware virtualization extensions.
If the host CPU did not support hardware virtualization, the error would typically be about KVM not being available or /dev/kvm missing. The specific error about host-passthrough requiring KVM indicates that the guest is configured to use host-passthrough CPU mode, but the hypervisor is not KVM. This is not about the CPU's virtualization capabilities but about the hypervisor in use.
- A
The host CPU is too old and does not support the host-passthrough mode.
Why it fails: The host-passthrough mode does not depend on the CPU's age or specific features; it simply passes through the host CPU model. The limitation is not about CPU capabilities but about the hypervisor. Even an older CPU can use host-passthrough if KVM is available. Therefore, this is not the likely cause of the error.
- B
The guest's XML configuration has a typo in the CPU mode attribute.
Why it fails: A typo in the CPU mode attribute would likely result in an XML validation error or an 'unknown CPU mode' message. The error specifically mentions 'host-passthrough' and 'requires KVM', which indicates that the mode is recognized but not supported by the current hypervisor. A typo would not produce this specific error.
- C
The guest is configured to use a CPU mode that is only supported by the KVM hypervisor, but the hypervisor is not KVM (e.g., QEMU TCG).
The host-passthrough CPU mode exposes the host CPU features directly to the guest and requires hardware virtualization (KVM). If libvirt is using a different hypervisor, such as QEMU's TCG (software emulation), this mode is not supported. The error clearly states that host-passthrough requires KVM, so the most likely cause is that the guest is running under a non-KVM hypervisor, possibly due to KVM not being enabled or the domain XML specifying a different hypervisor.
- D
The host CPU does not support hardware virtualization extensions.
Why it fails: If the host CPU did not support hardware virtualization, the error would typically be about KVM not being available or /dev/kvm missing. The specific error about host-passthrough requiring KVM indicates that the guest is configured to use host-passthrough CPU mode, but the hypervisor is not KVM. This is not about the CPU's virtualization capabilities but about the hypervisor in use.