Skip to content

Commit b77adf6

Browse files
authored
Merge pull request #60760 from sabrinajess/CNV19775
CNV-19775: configuring the default CPU model
2 parents 87db604 + 87c90c1 commit b77adf6

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3680,6 +3680,8 @@ Topics:
36803680
File: virt-specifying-nodes-for-vms
36813681
- Name: Configuring certificate rotation
36823682
File: virt-configuring-certificate-rotation
3683+
- Name: Configuring the default CPU model
3684+
File: virt-configuring-default-cpu-model
36833685
- Name: UEFI mode for virtual machines
36843686
File: virt-uefi-mode-for-vms
36853687
- Name: Configuring PXE booting for virtual machines
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/vm_networking/virt-configuring-default-cpu-model.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="virt-configuring-default-cpu-model_{context}"]
7+
= Configuring the default CPU model
8+
9+
Configure the `defaultCPUModel` by updating the `HyperConverged` custom resource (CR). You can change the `defaultCPUModel` while {VirtProductName} is running.
10+
11+
[NOTE]
12+
====
13+
The `defaultCPUModel` is case sensitive.
14+
====
15+
16+
.Prerequisites
17+
18+
* Install the OpenShift CLI (oc).
19+
20+
.Procedure
21+
22+
. Open the `HyperConverged` CR by running the following command:
23+
+
24+
[source,terminal]
25+
----
26+
$ oc edit hco -n openshift-cnv kubevirt-hyperconverged
27+
----
28+
29+
. Add the `defaultCPUModel` field to the CR and set the value to the name of a CPU model that exists in the cluster:
30+
31+
+
32+
[source,yaml]
33+
----
34+
apiVersion: hco.kubevirt.io/v1beta1
35+
kind: HyperConverged
36+
metadata:
37+
name: kubevirt-hyperconverged
38+
namespace: openshift-cnv
39+
spec:
40+
defaultCPUModel: "EPYC"
41+
----
42+
43+
. Apply the YAML file to your cluster.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
:_content-type: ASSEMBLY
2+
[id="virt-configuring-default-cpu-model"]
3+
= Configuring the default CPU model
4+
include::_attributes/common-attributes.adoc[]
5+
:context: virt-configuring-default-cpu-model
6+
7+
Use the `defaultCPUModel` setting in the `HyperConverged` custom resource (CR) to define a cluster-wide default CPU model.
8+
9+
The virtual machine (VM) CPU model depends on the availability of CPU models within the VM and the cluster.
10+
11+
* If the VM does not have a defined CPU model:
12+
** The `defaultCPUModel` is automatically set using the CPU model defined at the cluster-wide level.
13+
* If both the VM and the cluster have a defined CPU model:
14+
** The VM’s CPU model takes precedence.
15+
* If neither the VM nor the cluster have a defined CPU model:
16+
** The host-model is automatically set using the CPU model defined at the host level.
17+
18+
toc::[]
19+
20+
include::modules/virt-configuring-default-cpu-model.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)