Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/virt-about-auto-bootsource-updates.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

Boot sources can make virtual machine (VM) creation more accessible and efficient for users. If automatic boot source updates are enabled, the Containerized Data Importer (CDI) imports, polls, and updates the images so that they are ready to be cloned for new VMs. By default, CDI automatically updates the _system-defined_ boot sources that {VirtProductName} provides.

You can opt out of automatic updates for all system-defined boot sources by disabling the `enableCommonBootImageImport` feature gate. If you disable this feature gate, all `DataImportCron` objects are deleted. This does not remove previously imported `PersistentVolumeClaim` (PVC) objects that store operating system images, though administrators can delete them manually.
You can opt out of automatic updates for all system-defined boot sources by disabling the `enableCommonBootImageImport` feature gate. If you disable this feature gate, all `DataImportCron` objects are deleted. This does not remove previously imported boot source objects that store operating system images, though administrators can delete them manually.

When the `enableCommonBootImageImport` feature gate is disabled, `DataSource` objects are reset so that they no longer point to the original PVCs. An administrator can manually provide a boot source by creating a new PVC for the `DataSource` object and populating the PVC with an operating system image.
When the `enableCommonBootImageImport` feature gate is disabled, `DataSource` objects are reset so that they no longer point to the original boot source. An administrator can manually provide a boot source by populating a PVC with an operating system, optionally creating a volume snapshot from the PVC, and then referring to the PVC or volume snapshot from the `DataSource` object.

_Custom_ boot sources that are not provided by {VirtProductName} are not controlled by the feature gate. You must manage them individually by editing the `HyperConverged` custom resource (CR). You can also use this method to manage individual system-defined boot sources.

Expand Down
2 changes: 1 addition & 1 deletion modules/virt-about-vms-and-boot-sources.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Virtual machines (VMs) consist of a VM definition and one or more disks that are

Every template requires a boot source, which is a fully configured disk image including configured drivers. Each template contains a VM definition with a pointer to the boot source. Each boot source has a predefined name and namespace. For some operating systems, a boot source is automatically provided. If it is not provided, then an administrator must prepare a custom boot source.

Provided boot sources are updated automatically to the latest version of the operating system. For auto-updated boot sources, persistent volume claims (PVCs) are created with the cluster's default storage class. If you select a different default storage class after configuration, you must delete the existing data volumes in the cluster namespace that are configured with the previous default storage class.
Provided boot sources are updated automatically to the latest version of the operating system. For auto-updated boot sources, persistent volume claims (PVCs) and volume snapshots are created with the cluster's default storage class. If you select a different default storage class after configuration, you must delete the existing boot sources in the cluster namespace that are configured with the previous default storage class.

2 changes: 1 addition & 1 deletion modules/virt-adding-a-boot-source-web.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You do not need special privileges to create a VM from a template with an operat
+
[NOTE]
====
Provided boot sources are updated automatically to the latest version of the operating system. For auto-updated boot sources, persistent volume claims (PVCs) are created with the cluster's default storage class. If you select a different default storage class after configuration, you must delete the existing data volumes in the cluster namespace that are configured with the previous default storage class.
Provided boot sources are updated automatically to the latest version of the operating system. For auto-updated boot sources, persistent volume claims (PVCs) and volume snapshots are created with the cluster's default storage class. If you select a different default storage class after configuration, you must delete the existing boot sources in the cluster namespace that are configured with the previous default storage class.
====

. Optional: Clear *Apply optimized StorageProfile settings* to edit the access mode or volume mode.
Expand Down
57 changes: 57 additions & 0 deletions modules/virt-enabling-volume-snapshot-boot-source.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Module included in the following assembly:
//
// * virt/storage/virt-automatic-bootsource-updates.adoc
//

:_content-type: PROCEDURE
[id="virt-enabling-volume-snapshot-boot-source_{context}"]
= Enabling volume snapshot boot sources

Enable volume snapshot boot sources by setting the parameter in the `StorageProfile` associated with the storage class that stores operating system base images. Although `DataImportCron` was originally designed to maintain only PVC sources, `VolumeSnapshot` sources scale better than PVC sources for certain storage types.

[NOTE]
====
Use volume snapshots on a storage profile that is proven to scale better when cloning from a single snapshot.
====

.Prerequisites

* You must have access to a volume snapshot with the operating system image.
* The storage must support snapshotting.

.Procedure

. Open the storage profile object that corresponds to the storage class used to provision boot sources by running the following command:
+
[source,terminal,subs="attributes+"]
----
$ oc edit storageprofile <storage_class> -oyaml
----

. Review the `dataImportCronSourceFormat` specification of the `StorageProfile` to confirm whether or not the VM is using PVC or volume snapshot by default.

. Edit the storage profile, if needed, by updating the `dataImportCronSourceFormat` specification to `snapshot`.
+
.Example storage profile
[source,yaml]
----
apiVersion: cdi.kubevirt.io/v1beta1
kind: StorageProfile
metadata:
# ...
spec:
dataImportCronSourceFormat: snapshot
----

.Verification

. Open the storage profile object that corresponds to the storage class used to provision boot sources.
+
[source,terminal,subs="attributes+"]
----
$ oc get storageprofile <storage_class>
----

. Confirm that the `dataImportCronSourceFormat` specification of the `StorageProfile` is set to 'snapshot', and that any `DataSource` objects that the `DataImportCron` points to now reference volume snapshots.

You can now use these boot sources to create virtual machines.
6 changes: 4 additions & 2 deletions virt/storage/virt-automatic-bootsource-updates.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Boot sources can make virtual machine (VM) creation more accessible and efficien
[id="managing-rh-boot-source-updates_virt-automatic-bootsource-updates"]
== Managing Red Hat boot source updates

You can opt out of automatic updates for all system-defined boot sources by disabling the `enableCommonBootImageImport` feature gate. If you disable this feature gate, all `DataImportCron` objects are deleted. This does not remove previously imported `PersistentVolumeClaim` (PVC) objects that store operating system images, though administrators can delete them manually.
You can opt out of automatic updates for all system-defined boot sources by disabling the `enableCommonBootImageImport` feature gate. If you disable this feature gate, all `DataImportCron` objects are deleted. This does not remove previously imported boot source objects that store operating system images, though administrators can delete them manually.

When the `enableCommonBootImageImport` feature gate is disabled, `DataSource` objects are reset so that they no longer point to the original PVCs. An administrator can manually provide a boot source by creating a new PVC for the `DataSource` object and populating the PVC with an operating system image.
When the `enableCommonBootImageImport` feature gate is disabled, `DataSource` objects are reset so that they no longer point to the original boot source. An administrator can manually provide a boot source by creating a new persistent volume claim (PVC) or volume snapshot for the `DataSource` object, then populating it with an operating system image.

include::modules/virt-managing-auto-update-all-system-boot-sources.adoc[leveloffset=+2]

Expand All @@ -37,6 +37,8 @@ include::modules/virt-configuring-storage-class-bootsource-update.adoc[leveloffs

include::modules/virt-autoupdate-custom-bootsource.adoc[leveloffset=+2]

include::modules/virt-enabling-volume-snapshot-boot-source.adoc[leveloffset=+2]

include::modules/virt-disable-auto-updates-single-boot-source.adoc[leveloffset=+1]

include::modules/virt-verify-status-bootsource-update.adoc[leveloffset=+1]