// Module included in the following assemblies:
//
// * virt/managing_vms/cpu_models/virt-configuring-default-cpu-model.adoc

:_mod-docs-content-type: PROCEDURE
[id="virt-per-vm-cpu-model-configuration_{context}"]
= Configure a CPU model per-VM

[role="_abstract"]
You can specify a named CPU model in the virtual machine (VM) specification. This per-VM configuration takes precedence over any cluster-wide default CPU model.

The VM CPU model depends on the availability of CPU models within the VM and the cluster.

* If the VM does not have a defined CPU model, the `defaultCPUModel` is automatically set using the CPU model defined at the cluster-wide level.
* If both the VM and the cluster have a defined CPU model, the VM’s CPU model takes precedence.
* If neither the VM nor the cluster have a defined CPU model, the host-model is automatically set using the CPU model defined at the host level.

.Prerequisites

* Install the {oc-first}.

.Procedure

. To configure a named CPU model for a specific VM, edit the `VirtualMachine` custom resource (CR):
+
[source,yaml]
----
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  name: myvm
spec:
  template:
    spec:
      domain:
        cpu:
          model: Conroe
----
+
* `spec.template.spec.domain.cpu.model` defines the named CPU model for the VM.

. Apply the CR to your cluster.
