# 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.

{% tabs %}
{% tab title="nova\_override.conf - host-model" %}

```javascript
[libvirt]
cpu_mode = host-model
cpu_model_extra_flags = <flags seperated by comma>
```

{% endtab %}
{% endtabs %}

```
  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.
```

{% hint style="info" %}
**Info**

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

{% tabs %}
{% tab title="nova\_override.conf - host-passthrough" %}

```javascript
[libvirt]
cpu_mode = host-passthrough
```

{% endtab %}
{% endtabs %}

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

{% tabs %}
{% tab title="Javascript" %}

```javascript
# sudo systemctl restart pf9-ostackhost

# openstack server reboot --hard [Instance_UUID]
```

{% endtab %}
{% endtabs %}

Now, guest VM will start showing that flags.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platform9.com/kb/pmo/how-to/use-all-host-cpu-features-to-the-guest-by-updating-cpu-modes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
