[libvirt_manager] Add opt-in KVM discard/TRIM support#4005
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 22m 58s |
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 20m 55s |
e5d1192 to
93f4032
Compare
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>
testing a more generalized kvm trim approach