Skip to content

Commit ff3526e

Browse files
erpeters157openshift-cherrypick-robot
authored andcommitted
Initial draft of updates
1 parent 07ff6c8 commit ff3526e

13 files changed

+269
-19
lines changed

_topic_maps/_topic_map.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4822,13 +4822,16 @@ Topics:
48224822
- Name: Advanced VM creation
48234823
Dir: creating_vms_advanced
48244824
Topics:
4825-
- Name: Advanced virtual machine creation overview
4826-
File: advanced-vm-creation-overview
4827-
- Name: Creating VMs in the web console
4825+
- Name: Creating VMs from Red Hat images
48284826
Dir: creating_vms_advanced_web
48294827
Topics:
4830-
- Name: Creating VMs from Red Hat images
4828+
- Name: Creating virtual machines from Red Hat images
48314829
File: virt-creating-vms-from-rh-images-overview
4830+
- Name: Heterogeneous cluster support
4831+
File: virt-golden-image-heterogeneous-clusters
4832+
- Name: Creating VMs in the web console
4833+
Dir: creating_vms_advanced_web
4834+
Topics:
48324835
- Name: Creating VMs by importing images from web pages
48334836
File: virt-creating-vms-from-web-images
48344837
- Name: Creating VMs by uploading images

_topic_maps/_topic_map_rosa.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,11 +1753,16 @@ Topics:
17531753
Topics:
17541754
# - Name: Overview
17551755
# File: virt-advanced-vm-overview
1756-
- Name: Creating VMs in the web console
1756+
- Name: Creating VMs from Red Hat images
17571757
Dir: creating_vms_advanced_web
17581758
Topics:
1759-
- Name: Creating VMs from Red Hat images
1759+
- Name: Creating virtual machines from Red Hat images
17601760
File: virt-creating-vms-from-rh-images-overview
1761+
- Name: Heterogeneous cluster support
1762+
File: virt-golden-image-heterogeneous-clusters
1763+
- Name: Creating VMs in the web console
1764+
Dir: creating_vms_advanced_web
1765+
Topics:
17611766
- Name: Creating VMs by importing images from web pages
17621767
File: virt-creating-vms-from-web-images
17631768
- Name: Creating VMs by uploading images

_topic_maps/_topic_map_rosa_hcp.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,11 +1585,16 @@ Topics:
15851585
Topics:
15861586
# - Name: Overview
15871587
# File: virt-advanced-vm-overview
1588-
- Name: Creating VMs in the web console
1588+
- Name: Creating VMs from Red Hat images
15891589
Dir: creating_vms_advanced_web
15901590
Topics:
1591-
- Name: Creating VMs from Red Hat images
1591+
- Name: Creating virtual machines from Red Hat images
15921592
File: virt-creating-vms-from-rh-images-overview
1593+
- Name: Heterogeneous cluster support
1594+
File: virt-golden-image-heterogeneous-clusters
1595+
- Name: Creating VMs in the web console
1596+
Dir: creating_vms_advanced_web
1597+
Topics:
15931598
- Name: Creating VMs by importing images from web pages
15941599
File: virt-creating-vms-from-web-images
15951600
- Name: Creating VMs by uploading images
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/advanced_vm_management/virt-creating-vms-from-rh-images-overview.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-add-custom-golden-image-heterogeneous-cluster_{context}"]
7+
8+
= Adding a custom golden image in a heterogeneous cluster
9+
10+
:FeatureName: Golden image support for heterogeneous clusters
11+
include::snippets/technology-preview.adoc[]
12+
13+
Add a custom golden image in a heterogeneous cluster by setting the `ssp.kubevirt.io/dict.architectures` annotation in the `spec.dataImportCronTemplates.metadata.annotations` stanza of the `HyperConverged` custom resource (CR). This annotation lists the architectures supported by the image.
14+
15+
.Prerequisites
16+
17+
* You have installed the {oc-first}.
18+
19+
.Procedure
20+
21+
. Open the `HyperConverged` CR in your default editor by running the following command:
22+
+
23+
[source,terminal,subs="attributes+"]
24+
----
25+
$ oc edit hyperconverged kubevirt-hyperconverged -n {CNVNamespace}
26+
----
27+
28+
. Edit the `HyperConverged` CR, to add the custom golden image. You must add the appropriate values for `ssp.kubevirt.io/dict.architectures` annotation in the `dataImportCronTemplates` section. For example:
29+
+
30+
[source,yaml]
31+
----
32+
apiVersion: hco.kubevirt.io/v1beta1
33+
kind: HyperConverged
34+
metadata:
35+
name: kubevirt-hyperconverged
36+
spec:
37+
dataImportCronTemplates:
38+
- metadata:
39+
name: custom-image1
40+
annotations:
41+
ssp.kubevirt.io/dict.architectures: "<architecture_list>" <1>
42+
spec:
43+
schedule: "0 */12 * * *"
44+
template:
45+
spec:
46+
source:
47+
registry:
48+
url: docker://myprivateregistry/custom1
49+
managedDataSource: custom1
50+
retentionPolicy: "All"
51+
#...
52+
----
53+
<1> The comma-separated list of supported architectures for this image. For example, if the image supports `amd64` and `arm64` architectures, the value would be `"amd64,arm64"`.
54+
+
55+
[NOTE]
56+
====
57+
An image may support more architectures than you want to use in your cluster. You do not have to list all of the architectures an image supports, only those for which you want to create a boot source.
58+
====
59+
. Save and exit the editor to update the `HyperConverged` CR.

modules/virt-creating-vm-from-template.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ You can choose between two views in the web console to create the VM:
2121
** For a general view, navigate to *Virtualization* -> *Catalog*.
2222
. Click the *Template catalog* tab.
2323
. Click the *Boot source available* checkbox to filter templates with boot sources. The catalog displays the default templates.
24+
25+
. Heterogeneous clusters only: To filter the search results to show templates associated with a particular architecture, click *Architecture Type* .
26+
2427
. Click *All templates* to view the available templates for your filters.
2528
** To focus on particular templates, enter the keyword in the `Filter by keyword` field.
2629
** Choose a template project from the *All projects* dropdown menu, or view all projects.

modules/virt-creating-vm-instancetype.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ The *InstanceTypes* tab opens by default.
5151
When configuring a downward-metrics device on an {ibm-z-name} system that uses a VM preference, set the `spec.preference.name` value to `rhel.9.s390x` or another available preference with the format `*.s390x`.
5252
====
5353

54+
. Heterogeneous clusters only: To filter the bootable volumes using the options provided, click *Architecture*.
55+
5456
. Select either of the following options:
5557
* Select a suitable bootable volume from the list. If the list is truncated, click the *Show all* button to display the entire list.
5658
+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/advanced_vm_management/virt-creating-vms-from-rh-images-overview.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-enabling-heterogeneous-clusters_{context}"]
7+
= Enabling heterogeneous cluster support
8+
9+
You can enable golden image support for heterogeneous clusters by setting the `enableMultiArchBootImageImport` feature gate to `true` in the `HyperConverged` custom resource (CR).
10+
11+
:FeatureName: Golden image support for heterogeneous clusters
12+
include::snippets/technology-preview.adoc[]
13+
14+
.Prerequisites
15+
16+
* You have access to the cluster as a user with `cluster-admin` permissions.
17+
* You have installed the {oc-first}.
18+
19+
.Procedure
20+
21+
* Enable the `enableMultiArchBootImageImport` feature gate by running the following command:
22+
+
23+
[source,terminal,subs="attributes+"]
24+
----
25+
$ oc patch hyperconverged kubevirt-hyperconverged -n {CNVNamespace} \
26+
--type json -p '[{"op":"replace","path":"/spec/featureGates/enableMultiArchBootImageImport", "value": true}]'
27+
----

modules/virt-generalizing-linux-vm-image.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ $ virt-sysprep -a disk.img
9595

9696
.. From the *Default Instance Type* list, select the instance type with the correct CPU and memory requirements for the version of {op-system-base} you selected previously.
9797

98+
.. Heterogeneous clusters only: From the *Architecture* list, select the architecture that corresponds with the selected volume.
99+
98100
.. Click *Save*.
99101

100102
The new volume appears in the *Select volume to boot from* list. This is your new golden image. You can use this volume to create new VMs.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/advanced_vm_management/virt-creating-vms-from-rh-images-overview.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-mod-golden-image-heterogeneous-clusters_{context}"]
7+
= Modifying a common golden image source in a heterogeneous cluster
8+
9+
You can modify the image source of a common golden image in a heterogeneous cluster by specifying the supported architectures in the `ssp.kubevirt.io/dict.architectures` annotation in the `HyperConverged` custom resource (CR).
10+
11+
:FeatureName: Golden image support for heterogeneous clusters
12+
include::snippets/technology-preview.adoc[]
13+
14+
.Prerequisites
15+
16+
* You have installed the {oc-first}.
17+
18+
.Procedure
19+
20+
. Open the `HyperConverged` CR in your default editor by running the following command:
21+
+
22+
[source,terminal,subs="attributes+"]
23+
----
24+
$ oc edit hyperconverged kubevirt-hyperconverged -n {CNVNamespace}
25+
----
26+
27+
. Edit the `HyperConverged` CR, adding the appropriate values for `ssp.kubevirt.io/dict.architectures` annotation in the `dataImportCronTemplates` section. For example:
28+
+
29+
[source,yaml]
30+
----
31+
#...
32+
spec:
33+
dataImportCronTemplates:
34+
- metadata:
35+
name: kubevirt-hyperconverged
36+
annotations:
37+
ssp.kubevirt.io/dict.architectures: "<architecture_list>" <1>
38+
spec:
39+
schedule: "0 */12 * * *"
40+
template:
41+
spec:
42+
source:
43+
registry:
44+
url: docker://my-private-registry/my-own-version-of-centos:8
45+
managedDataSource: centos-stream8
46+
#...
47+
----
48+
<1> The comma-separated list of supported architectures for this image. For example, if the image supports `amd64` and `arm64` architectures, the value would be `"amd64,arm64"`.
49+
50+
. Save and exit the editor to update the `HyperConverged` CR.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/advanced_vm_management/virt-creating-vms-from-rh-images-overview.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-modify-workload-node-heterogeneous-cluster_{context}"]
7+
8+
= Modifying workloads node placement in a heterogeneous cluster
9+
10+
:FeatureName: Golden image support for heterogeneous clusters
11+
include::snippets/technology-preview.adoc[]
12+
13+
If you have a heterogeneous cluster but not want to enable multiple archiecture support, you can modify the workloads node placement in the `HyperConverged` custom resource (CR) to only include nodes with a specific architecture.
14+
15+
.Prerequisites
16+
17+
* You have installed the {oc-first}.
18+
19+
.Procedure
20+
21+
. Open the `HyperConverged` CR in your default editor by running the following command:
22+
+
23+
[source,terminal,subs="attributes+"]
24+
----
25+
$ oc edit hyperconverged kubevirt-hyperconverged -n {CNVNamespace}
26+
----
27+
28+
. Edit the `HyperConverged` CR, to modify the workloads node placement to include only nodes with a specific architecture. For example:
29+
+
30+
[source,yaml]
31+
----
32+
apiVersion: hco.kubevirt.io/v1beta1
33+
kind: HyperConverged
34+
metadata:
35+
name: kubevirt-hyperconverged
36+
spec:
37+
#...
38+
workloads:
39+
nodePlacement:
40+
affinity:
41+
nodeAffinity:
42+
requiredDuringSchedulingIgnoredDuringExecution:
43+
nodeSelectorTerms:
44+
- matchExpressions:
45+
- key: kubernetes.io/arch
46+
operator: In
47+
values:
48+
- <node_architecture> <1>
49+
----
50+
<1> Replace `<node_architecture>` with the target architecture. For example, to limit placement to AMD nodes, use `amd64`.
51+
52+
. Save and exit the editor to update the `HyperConverged` CR.

0 commit comments

Comments
 (0)