File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -533,19 +533,31 @@ launch_vm() {
533
533
vm_extra_args=" fips=${fips_mode} "
534
534
vm_initrd_inject=" "
535
535
536
- declare -A os_map=(
537
- [" rhel94-bootc" ]=" rhel9.4"
538
- [" rhel-9.4" ]=" rhel9.4"
539
- [" centos9-bootc" ]=" centos-stream9"
540
- [" centos9" ]=" centos-stream9" )
536
+ local osname
537
+
538
+ case " ${boot_blueprint} " in
539
+ rhel* 9* 4* )
540
+ osname=" rhel9.4"
541
+ ;;
542
+ centos9* )
543
+ osname=" centos-stream9"
544
+ ;;
545
+ * )
546
+ record_junit " ${vmname} " " osname-parse" " FAILED"
547
+ exit 1
548
+ ;;
549
+ esac
550
+
551
+ record_junit " ${vmname} " " osname-parse" " OK"
552
+
541
553
542
554
# Add support of bootc image directory sharing with virtual machines
543
555
if [ " ${bootc_mode} " -ne 0 ] ; then
544
556
# The ISO files generated by bootc-image-builder is not recognized by virt-install.
545
557
# Work around the problem by specifying kernel and initrd paths.
546
558
if [[ " ${boot_blueprint} .iso" == * -bootc.iso ]] ; then
547
559
vm_loc_args+=" ,kernel=images/pxeboot/vmlinuz,initrd=images/pxeboot/initrd.img"
548
- vm_loc_args+=" --osinfo name=${os_map[${boot_blueprint}] } "
560
+ vm_loc_args+=" --osinfo name=${osname } "
549
561
fi
550
562
fi
551
563
You can’t perform that action at this time.
0 commit comments