Skip to content

Update osbuild.py to use 30 GiB disk size#586

Merged
comps merged 1 commit intoRHSecurityCompliance:mainfrom
matusmarhefka:issue_14551
Apr 9, 2026
Merged

Update osbuild.py to use 30 GiB disk size#586
comps merged 1 commit intoRHSecurityCompliance:mainfrom
matusmarhefka:issue_14551

Conversation

@matusmarhefka
Copy link
Copy Markdown
Contributor

@matusmarhefka matusmarhefka commented Apr 9, 2026

Switch to partitioning_mode = "raw" to make sure that /
filesystem is grown to fill any left over space on the partition
table which is not the default behavior with auto-lvm and filesystem
customizations in blueprint, see
https://osbuild.org/docs/user-guide/partitioning/
https://osbuild.org/docs/user-guide/blueprint-reference/#partitioning-mode

Before this update the disk for imported VM could have been smaller
based on filesystem customizations in blueprint and with auto-lvm
partitioning mode it only allocated 1 GiB for / and 2 GiB for /usr,
if /usr was not on a separate partition / filesystem was configured
to have 3 GiB. This was not enough for some profiles like STIG.

Additionally, STIG also uses 10 GiB for /var/log/audit. To make sure
there is enough space on VM disk update composer-cli compose start
to always allocate 30 GiB disk which should be enough for all profiles.
Note: virt.Guest.import_image doesn't specify disk size, it only imports
the disk created by composer-cli.

Resolves ComplianceAsCode/content#14551

@matusmarhefka matusmarhefka marked this pull request as ready for review April 9, 2026 09:36
Switch to `partitioning_mode = "raw"` to make sure that `/`
filesystem is grown to fill any left over space on the partition
table which is not the default behavior with `auto-lvm` and filesystem
customizations in blueprint, see
https://osbuild.org/docs/user-guide/partitioning/
https://osbuild.org/docs/user-guide/blueprint-reference/#partitioning-mode

Before this update the disk for imported VM could have been smaller
based on filesystem customizations in blueprint and with `auto-lvm`
partitioning mode it only allocated 1 GiB for `/` and 2 GiB for `/usr`,
if `/usr` was not on a separate partition `/` filesystem was configured
to have 3 GiB. This was not enough for some profiles like STIG.

Additionally, STIG also uses 10 GiB for `/var/log/audit`. To make sure
there is enough space on VM disk update `composer-cli compose start`
to always allocate 30 GiB disk which should be enough for all profiles.
Note: `virt.Guest.import_image` doesn't specify disk size, it only imports
the disk created by `composer-cli`.

Resolves ComplianceAsCode/content#14551
@matusmarhefka matusmarhefka changed the title Update osbuild.py to reduce /var/log/audit from 10 GiB to 512 MiB Update osbuild.py to use 30 GiB disk size Apr 9, 2026
@comps comps merged commit 183e64c into RHSecurityCompliance:main Apr 9, 2026
4 checks passed
@matusmarhefka matusmarhefka deleted the issue_14551 branch April 9, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

STIG profile scan fails on RHEL 8 system created by Image Builder

2 participants