Deckhouse Platform (DP) stores virtual machine images in an internal container image storage (DVCR) that resides on a persistent volume of the cluster. Images travel from there to virtual machine disks, so the size of the volume determines how many images fit into the cluster.

Size and storage class

Set the volume size and the storage class in the .spec.settings.dvcr.storage block. To expand the storage, increase the volume size.

After the volume is created, you can’t reduce its size or change its storage class.

Cleaning up image storage

When images and disks are deleted from the cluster, their data remains in DVCR for some time. To keep the storage from filling up with stale data, DP runs garbage collection on a schedule. By default, it runs daily at 02:00. To set your own schedule, use the .spec.settings.dvcr.gc.schedule parameter in the virtualization ModuleConfig.

While garbage collection is running, the storage works in read-only mode, so creating images and disks is postponed until it completes.

  • Using the CLI
  • Using the web interface

Example configuration with a custom schedule:

apiVersion: deckhouse.io/v1alpha1
kind: ModuleConfig
metadata:
  name: virtualization
spec:
  # ...
  settings:
    dvcr:
      gc:
        schedule: "0 20 * * *"
  # ...

To see how much space is occupied and which data will be removed during the next collection, run:

d8 k -n d8-virtualization exec deploy/dvcr -- dvcr-cleaner gc check

Example output:

Found 2 cvi, 5 vi, 1 vd manifests in registry
Found 1 cvi, 5 vi, 11 vd resources in cluster
  Total     Used    Avail     Use%
36.3GiB  13.1GiB  22.4GiB      39%
Images eligible for cleanup:
KIND                   NAMESPACE            NAME
ClusterVirtualImage                         debian-12
VirtualDisk            default              debian-10-root
VirtualImage           default              ubuntu-2404
  1. Go to the System tab, then to DeckhouseModules.
  2. Select the virtualization module from the list.
  3. In the window that opens, on the Configuration tab, enable the Advanced settings toggle.
  4. In the Disk and ISO image storage block, set the schedule in the Cleanup schedule in Cron format field.
  5. Click Save.

Additional resources