cook: two default dishes (phyllomeos, phyllomeos-headless) + guest/experimental tiers; CI builds raw images
Manifest groups get a tier; only `default` is generated (make all TIER=..., --tier). Default: phyllomeos (GNOME + virt-manager) and phyllomeos-headless, Fedora 44, systemd-boot, CPU-agnostic hypervisor ingredient (hypervisor_type: any). guest tier: guest-server, guest-desktop. experimental: biosboot/grub, encrypted, rawhide. Generator clears stale recipes/dishes before writing. build-image.sh: --dish and --tier; deploy.sh: --tier. build-iso.yaml replaced by build-image.yaml: raw images for both editions on the fedora:host runner (TMPDIR=/var/tmp, max-parallel 1), attached with the flattened kickstarts to tagged releases. Live edition no longer built. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
35d8879bcc
commit
67316d9852
@@ -0,0 +1,33 @@
|
||||
# CPU-agnostic optimization for hypervisor (Intel and AMD)
|
||||
#
|
||||
# One ingredient for both CPU vendors, so a single dish can be installed on either:
|
||||
# * intel_iommu=on is ignored by AMD kernels (amd_iommu is enabled by default).
|
||||
# * "options kvm_intel"/"options kvm_amd" only apply to the module that actually loads.
|
||||
|
||||
%post --nochroot --log=/mnt/sysimage/root/hypervisor-cpu-post.log # Beginning of %post section. Those commands are executed outside the chroot environment. Logging is enabled to help with post-installation troubleshooting
|
||||
|
||||
# Kernel arguments cannot be attached to a single canonical location at %post time:
|
||||
# anaconda always creates /etc/kernel/cmdline (kernel-install source for both
|
||||
# systemd-boot and GRUB+BLS layouts), but GRUB+BLS boot entries have already been
|
||||
# generated from it by the kernel package scriptlets, and non-BLS flows still read
|
||||
# /etc/default/grub. Update every surface idempotently, guarded by file existence.
|
||||
|
||||
IOMMU_ARGS="intel_iommu=on iommu=pt rd.driver.pre=vfio-pci"
|
||||
|
||||
if [ -f /mnt/sysimage/etc/kernel/cmdline ]; then # kernel-install source (systemd-boot now, GRUB+BLS for future kernels)
|
||||
grep -q "iommu=pt" /mnt/sysimage/etc/kernel/cmdline || echo " $IOMMU_ARGS" >> /mnt/sysimage/etc/kernel/cmdline # Append IOMMU arguments once
|
||||
fi
|
||||
|
||||
if [ -f /mnt/sysimage/etc/default/grub ]; then # GRUB: arguments for grub.cfg-based boot flows
|
||||
grep -q "iommu=pt" /mnt/sysimage/etc/default/grub || sed -i "s/\(quiet\)/\1 $IOMMU_ARGS/i" /mnt/sysimage/etc/default/grub # Append IOMMU arguments once
|
||||
fi
|
||||
|
||||
for bls_entry in /mnt/sysimage/boot/loader/entries/*.conf; do # Already-generated boot entries share one "options" line shape
|
||||
[ -e "$bls_entry" ] || continue # Nothing matched: the glob stays literal
|
||||
grep -q "iommu=pt" "$bls_entry" || sed -i "s/^\(options .*\)/\1 $IOMMU_ARGS/" "$bls_entry" # Patch the options line of each entry once
|
||||
done
|
||||
|
||||
grep -q "kvm_intel" /mnt/sysimage/etc/modprobe.d/kvm.conf 2>/dev/null || echo "options kvm_intel nested=1" >> /mnt/sysimage/etc/modprobe.d/kvm.conf # Add support for nested virtualization on Intel CPUs, exactly once
|
||||
grep -q "kvm_amd" /mnt/sysimage/etc/modprobe.d/kvm.conf 2>/dev/null || echo "options kvm_amd nested=1" >> /mnt/sysimage/etc/modprobe.d/kvm.conf # Add support for nested virtualization on AMD CPUs, exactly once
|
||||
|
||||
%end # End of the %post section
|
||||
Reference in New Issue
Block a user