Use All host CPU Features To The Guest By Updating CPU modes

Problem

Some of the CPU feature flags are not passed to the guest VM by default or If you want to use all features from the host CPU.

Environment

  • Platform9 Managed OpenStack - v5.4 and Higher

Procedure

We have two methods to pass those flags to guest VMs. This need to be updated in the [ libvirt ] section of */opt/pf9/etc/nova/conf.d/nova_override.conf. *

  1. Using host-model - host-model is a safe choice if your compute node CPUs are largely identical. That closely matches the host and requests additional CPU flags to complete the match if flags are not passed by default.
nova_override.conf - host-model
Copy

2. Using host-passthrough - libvirt tells KVM to pass through the host CPU with no modifications. In comparison to host-model which simply matches feature flags, host-passthrough ensures every last detail of the host CPU is matched. This gives the best performance, and can be important to some apps which check low level CPU details, but it comes at a cost with respect to migration.

In host-passthrough mode, the guest can only be live-migrated to a target host that matches the source host extremely closely

nova_override.conf - host-passthrough
Copy

After updating the file restart the pf9-ostackhost service and reboot the guest VM.

Javascript
Copy

Now, guest VM will start showing that flags.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard