Skip to content

Commit 5e1b0aa

Browse files
authored
Merge pull request #65659 from sabrinajess/CNV22037-2
CNV-22037: new content volume snapshot
2 parents 2f4a7cb + 59b2a4c commit 5e1b0aa

5 files changed

+65
-6
lines changed

modules/virt-about-auto-bootsource-updates.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
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.
1111

12-
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.
12+
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.
1313

14-
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.
14+
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.
1515

1616
_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.
1717

modules/virt-about-vms-and-boot-sources.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ Virtual machines (VMs) consist of a VM definition and one or more disks that are
1010

1111
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.
1212

13-
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.
13+
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.
1414

modules/virt-adding-a-boot-source-web.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ You do not need special privileges to create a VM from a template with an operat
3737
+
3838
[NOTE]
3939
====
40-
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.
40+
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.
4141
====
4242

4343
. Optional: Clear *Apply optimized StorageProfile settings* to edit the access mode or volume mode.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Module included in the following assembly:
2+
//
3+
// * virt/storage/virt-automatic-bootsource-updates.adoc
4+
//
5+
6+
:_content-type: PROCEDURE
7+
[id="virt-enabling-volume-snapshot-boot-source_{context}"]
8+
= Enabling volume snapshot boot sources
9+
10+
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.
11+
12+
[NOTE]
13+
====
14+
Use volume snapshots on a storage profile that is proven to scale better when cloning from a single snapshot.
15+
====
16+
17+
.Prerequisites
18+
19+
* You must have access to a volume snapshot with the operating system image.
20+
* The storage must support snapshotting.
21+
22+
.Procedure
23+
24+
. Open the storage profile object that corresponds to the storage class used to provision boot sources by running the following command:
25+
+
26+
[source,terminal,subs="attributes+"]
27+
----
28+
$ oc edit storageprofile <storage_class> -oyaml
29+
----
30+
31+
. Review the `dataImportCronSourceFormat` specification of the `StorageProfile` to confirm whether or not the VM is using PVC or volume snapshot by default.
32+
33+
. Edit the storage profile, if needed, by updating the `dataImportCronSourceFormat` specification to `snapshot`.
34+
+
35+
.Example storage profile
36+
[source,yaml]
37+
----
38+
apiVersion: cdi.kubevirt.io/v1beta1
39+
kind: StorageProfile
40+
metadata:
41+
# ...
42+
spec:
43+
dataImportCronSourceFormat: snapshot
44+
----
45+
46+
.Verification
47+
48+
. Open the storage profile object that corresponds to the storage class used to provision boot sources.
49+
+
50+
[source,terminal,subs="attributes+"]
51+
----
52+
$ oc get storageprofile <storage_class>
53+
----
54+
55+
. 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.
56+
57+
You can now use these boot sources to create virtual machines.

virt/storage/virt-automatic-bootsource-updates.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Boot sources can make virtual machine (VM) creation more accessible and efficien
1717
[id="managing-rh-boot-source-updates_virt-automatic-bootsource-updates"]
1818
== Managing Red Hat boot source updates
1919

20-
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.
20+
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.
2121

22-
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.
22+
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.
2323

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

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

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

40+
include::modules/virt-enabling-volume-snapshot-boot-source.adoc[leveloffset=+2]
41+
4042
include::modules/virt-disable-auto-updates-single-boot-source.adoc[leveloffset=+1]
4143

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

0 commit comments

Comments
 (0)