10.3.7. Increasing boot source disk image retention
You can configure image retention settings to increase the number of older operating system image versions preserved on the cluster.
When automatic boot source updates are enabled, the Containerized Data Importer (CDI) tracks and downloads the latest versions of operating system images. By default, the system aggressively minimizes the retention of older versions to conserve disk space. However, if you require a safety mechanism that allows you to roll back if a newly imported version introduces issues, you can increase the retention count.
Manually deleting older PersistentVolumeClaim or DataVolume objects associated with historic boot source imports does not impact cluster stability or future updates.
Procedure
Open the
HyperConvergedcustom resource (CR) in your default editor:$ oc edit hco kubevirt-hyperconverged -n openshift-cnvEdit the
spec.workloadSources.dataImportCronTemplatesfield to adjust theimportsToKeepparameter to your preferred retention threshold:apiVersion: hco.kubevirt.io/v1 kind: HyperConverged metadata: name: kubevirt-hyperconverged spec: workloadSources: dataImportCronTemplates: - metadata: name: rhel9-image-cron spec: garbageCollect: Outdated importsToKeep: 3 schedule: "0 */12 * * *" managedDataSource: rhel9