Skip to content

Commit 6310f55

Browse files
authored
Merge pull request #47939 from bgaydosrh/CNV-15737
CNV-15737: Document automatic boot source configuration
2 parents bc4b0d8 + 00289e0 commit 6310f55

File tree

4 files changed

+80
-3
lines changed

4 files changed

+80
-3
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Module included in the following assembly:
2+
//
3+
// * virt/virtual_machines/advanced_vm_management/virt-automatic-bootsource-updates.adoc
4+
//
5+
6+
:_content-type: PROCEDURE
7+
[id="virt-configuring-storage-class-bootsource-update_{context}"]
8+
= Configuring a storage class for custom boot source updates
9+
10+
You must configure a storage class that allows automatic updating for custom boot sources.
11+
12+
.Procedure
13+
14+
* Choose the appropriate method to configure a storage class:
15+
** Edit the `HyperConverged` custom resource (CR) and define a `storageClassName`.
16+
+
17+
[source,yaml]
18+
----
19+
apiVersion: hco.kubevirt.io/v1beta1
20+
kind: HyperConverged
21+
metadata:
22+
name: kubevirt-hyperconverged
23+
spec:
24+
dataImportCronTemplates:
25+
- metadata:
26+
name: rhel8-image-cron
27+
spec:
28+
template:
29+
spec:
30+
storageClassName: <storage_class_name>
31+
...
32+
----
33+
** Set a default storage class by running the following commands:
34+
+
35+
[source,terminal]
36+
----
37+
oc patch storageclass <current_default_storage_class> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
38+
----
39+
+
40+
[source,terminal]
41+
----
42+
oc patch storageclass <appropriate_storage_class> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
43+
----
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Module included in the following assembly:
2+
//
3+
// * virt/virtual_machines/advanced_vm_management/virt-automatic-bootsource-updates.adoc
4+
//
5+
6+
:_content-type: PROCEDURE
7+
[id="virt-disable-individual-bootsource-update_{context}"]
8+
= Disabling an automatic update for a custom boot source
9+
10+
You can reduce the number of logs on disconnected environments or reduce resource usage by disabling the automatic imports and updates for an individual custom boot source.
11+
12+
.Procedure
13+
14+
* Edit the `HyperConverged` custom resource (CR) and disable updates for a custom boot source by setting the `dataimportcrontemplate.kubevirt.io/enable` annotation in the CR to `false`.
15+
+
16+
[source,yaml]
17+
----
18+
apiVersion: hco.kubevirt.io/v1beta1
19+
kind: HyperConverged
20+
metadata:
21+
name: kubevirt-hyperconverged
22+
spec:
23+
dataImportCronTemplates:
24+
- metadata:
25+
annotations:
26+
dataimportcrontemplate.kubevirt.io/enable: false
27+
name: rhel8-image-cron
28+
...
29+
----

virt/virtual_machines/advanced_vm_management/virt-automatic-bootsource-updates.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@ include::modules/virt-disable-bootsource-update.adoc[leveloffset=+1]
1414

1515
include::modules/virt-reenabling-bootsource-update.adoc[leveloffset=+1]
1616

17+
include::modules/virt-configuring-storage-class-bootsource-update.adoc[leveloffset=+1]
18+
1719
include::modules/virt-autoupdate-custom-bootsource.adoc[leveloffset=+1]
20+
21+
include::modules/virt-disable-individual-bootsource-update.adoc[leveloffset=+1]

virt/virtual_machines/virtual_disks/virt-creating-and-using-boot-sources.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ include::modules/virt-creating-a-custom-image-boot-source-web.adoc[leveloffset=+
2626
[role="_additional-resources"]
2727
== Additional resources
2828
* xref:../../../virt/vm_templates/virt-creating-vm-template.adoc#virt-create-vms[Creating virtual machine templates]
29-
* link:https://www.openshift.com/blog/creating-windows-virtual-machines-from-existing-images-with-openshift-virtualization[Creating a Microsoft Windows boot source from a cloud image]
30-
* link:https://www.openshift.com/blog/customizing-virtual-machine-templates-in-openshift-1[Customizing existing Microsoft Windows boot sources in {product-title}]
31-
* link:https://www.openshift.com/blog/creating-default-os-images-to-auto-clone-in-openshift-virtualization[Setting a PVC as a boot source for a Microsoft Windows template using the CLI]
29+
* xref:../../../virt/virtual_machines/advanced_vm_management/virt-automatic-bootsource-updates.adoc#virt-automatic-bootsource-updates[Automatic importing and updating of pre-defined boot sources]
30+
* link:https://www.openshift.com/blog/creating-windows-virtual-machines-from-existing-images-with-openshift-virtualization[Creating a Windows boot source from a cloud image]
31+
* link:https://www.openshift.com/blog/customizing-virtual-machine-templates-in-openshift-1[Customizing existing Windows boot sources in {product-title}]
32+
* link:https://www.openshift.com/blog/creating-default-os-images-to-auto-clone-in-openshift-virtualization[Setting a PVC as a boot source for a Windows template using the CLI]
3233
* link:https://www.openshift.com/blog/creating-a-windows-base-image-for-openshift[Creating boot sources using automated scripting]
3334
* link:https://www.openshift.com/blog/automatic-installation-of-a-windows-vm-using-openshift-virtualization[Creating a boot source automatically within a pod]

0 commit comments

Comments
 (0)