Skip to content

Commit b253e94

Browse files
author
Paul Whalen
committed
tests(anaconda-iso): use --location for direct kernel boot
Switch virt-install from --cdrom to --location with explicit kernel/initrd paths to enable direct kernel boot and serial console output during anaconda installation. Extract the ISO label dynamically with blkid for inst.stage2 and inst.ks arguments. This fixes the issue where --cdrom boot through the ISO GRUB gave no serial console visibility and anaconda silently failed to install in CI environments. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>" Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
1 parent 4b67c38 commit b253e94

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/greenboot-bootc-anaconda-iso.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,17 @@ greenprint "💾 Create vm qcow2 files for ISO installation"
302302
LIBVIRT_IMAGE_PATH_UEFI=/var/lib/libvirt/images/${TEST_UUID}-disk.qcow2
303303
sudo qemu-img create -f qcow2 "/var/lib/libvirt/images/${TEST_UUID}-disk.qcow2" 10G
304304
sudo restorecon -Rv /var/lib/libvirt/images/
305+
ISO_LABEL=$(blkid -o value -s LABEL /var/lib/libvirt/images/install.iso)
306+
greenprint "ISO label: ${ISO_LABEL}"
305307
sudo virt-install --name="${TEST_UUID}-uefi"\
306308
--disk path="${LIBVIRT_IMAGE_PATH_UEFI}",format=qcow2 \
307309
--ram 3072 \
308310
--vcpus 2 \
309311
--network network=integration,mac=34:49:22:B0:83:30 \
310312
--os-type linux \
311313
--os-variant ${OS_VARIANT} \
312-
--cdrom "/var/lib/libvirt/images/install.iso" \
314+
--location "/var/lib/libvirt/images/install.iso",kernel=images/pxeboot/vmlinuz,initrd=images/pxeboot/initrd.img \
315+
--extra-args "console=ttyS0,115200 inst.stage2=hd:LABEL=${ISO_LABEL} inst.ks=hd:LABEL=${ISO_LABEL}:/osbuild.ks" \
313316
--boot ${BOOT_ARGS} \
314317
--graphics none \
315318
--serial file,path=${CONSOLE_LOG} \

0 commit comments

Comments
 (0)