Skip to content

[libvirt_manager] Add opt-in KVM discard/TRIM support#4005

Draft
michburk wants to merge 1 commit into
openstack-k8s-operators:mainfrom
michburk:trim-config
Draft

[libvirt_manager] Add opt-in KVM discard/TRIM support#4005
michburk wants to merge 1 commit into
openstack-k8s-operators:mainfrom
michburk:trim-config

Conversation

@michburk

Copy link
Copy Markdown
Contributor

testing a more generalized kvm trim approach

@openshift-ci

openshift-ci Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign valkyrie00 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/ad2ec117a00c4e608a2c43340ddb735e

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 22m 58s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 26m 03s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 42m 50s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 06m 55s
✔️ cifmw-pod-zuul-files SUCCESS in 5m 53s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 38s
✔️ cifmw-pod-pre-commit SUCCESS in 9m 08s
cifmw-molecule-libvirt_manager FAILURE in 20m 49s
✔️ cifmw-molecule-reproducer SUCCESS in 13m 53s

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/6c3910a5366f4bf583218764fe44fa24

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 20m 55s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 29m 03s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 39m 07s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 07m 52s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 45s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 36s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 38s
✔️ cifmw-molecule-devscripts SUCCESS in 10m 26s
cifmw-molecule-libvirt_manager FAILURE in 20m 14s
✔️ cifmw-molecule-reproducer SUCCESS in 13m 33s

@michburk michburk force-pushed the trim-config branch 4 times, most recently from e5d1192 to 93f4032 Compare June 24, 2026 18:09
sparse qcow2 images grow over time; KVM discard/TRIM lets the guest
signal unused blocks back to the host so the image can shrink.

A single new per-VM-type param in cifmw_libvirt_manager_configuration:

  fstrim_enabled: when true, sets discard='unmap' on the primary disk
    <driver> element in domain.xml.j2 and enables fstrim.timer on a
    daily schedule in the guest. The timer is configured by a new
    configure_fstrim.yml called from deploy_layout.yml after VMs are
    managed, writing a systemd drop-in over SSH for all VM types
    including OCP/RHCOS.

Opt-in and omitted by default.

Generated-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Michael Burke <michburk@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant