The Compute service enables you to control the guest host CPU model that is exposed to KVM virtual machines. The use cases include:
You can define the CPU model for your deployment by setting the cpu_mode
parameter on the Reclass cluster level. A universal default value for this
parameter does not exist as the configuration depends a lot on a particular use
case, workload needs, and compute hardware. Therefore, picking up the value for
the cpu_mode
parameter is worth careful consideration.
The supported values include:
host-model
host-passthrough
custom
[libvirt]cpu_model
none
[libvirt] virt_type
as KVM/QEMU, the default CPU model from QEMU will be
used providing a basic set of CPU features that are compatible with most
hostsThe cpu_mode
parameter directly affects the possibility of performing the
VM migration. To be able to migrate a VM from one compute host to another one,
the destination host must support the CPU flags of the guest host. If a cloud
environment is running on a heterogeneous hardware, the cpu_mode
parameter
should be set to custom
. Though, such configuration will decrease the
workload performance.
Starting from the MCP maintenance update 2019.2.10, you can use the custom
CpuFlagsFilter
Nova scheduler filter. The filter works only for live
migrations and ensures that the CPU features of a live migration source host
match the target host. Use the CpuFlagsFilter
filter only if your
deployment meets the following criteria:
host-passthrough
or host-model
.