|
| 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. |
0 commit comments