From 8f0b5df403685228b157ee447c0936512e97b7e9 Mon Sep 17 00:00:00 2001 From: Adam Rozman Date: Mon, 18 Dec 2023 12:20:45 +0200 Subject: [PATCH] use ufei default instead of bios Apart from recent potential issues related to using bios, uefi default makes makes more sense in general as for a long time all enterprise hardware is either using uefi or secure-uefi. This commit: - switched the default libvirt boot loader firmware from bios to the more modern uefi --- config_example.sh | 2 +- lib/common.sh | 1 + lib/network.sh | 1 - vars.md | 2 +- vm-setup/roles/libvirt/defaults/main.yml | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config_example.sh b/config_example.sh index 3e3f99159..0dca171fe 100644 --- a/config_example.sh +++ b/config_example.sh @@ -118,7 +118,7 @@ # # Set libvirt firmware and BMC bootMode # Choose "legacy" (bios), "UEFI", or "UEFISecureBoot" -# Defaults to legacy for ipv4, UEFI for ipv6 +# Defaults to uefi # export BOOT_MODE="UEFI" # Select the Cluster API provider Metal3 version diff --git a/lib/common.sh b/lib/common.sh index ec3a0a24c..7ebe8030d 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -31,6 +31,7 @@ fi source "${CONFIG}" # Set variables +export BOOT_MODE="${BOOT_MODE:-UEFI}" export MARIADB_HOST="mariaDB" export MARIADB_HOST_IP="127.0.0.1" # Additional DNS diff --git a/lib/network.sh b/lib/network.sh index b3eed2d06..95643d854 100644 --- a/lib/network.sh +++ b/lib/network.sh @@ -46,7 +46,6 @@ if [[ "${BARE_METAL_PROVISIONER_SUBNET_IPV6_ONLY}" == "true" ]]; then export BOOT_MODE="${BOOT_MODE:-UEFI}" export BARE_METAL_PROVISIONER_NETWORK="${BARE_METAL_PROVISIONER_NETWORK:-fd2e:6f44:5dd8:b856::/64}" else - export BOOT_MODE="${BOOT_MODE:-legacy}" export BARE_METAL_PROVISIONER_NETWORK="${BARE_METAL_PROVISIONER_NETWORK:-172.22.0.0/24}" fi diff --git a/vars.md b/vars.md index bed7b2e3d..581004081 100644 --- a/vars.md +++ b/vars.md @@ -30,7 +30,7 @@ assured that they are persisted. | BMO_ROLLOUT_WAIT | Number of minutes(Until max 10m that is the default value of deployment.spec.progressDeadlineSeconds) to wait for BMO rollout | | 5 | | BMC_DRIVER | Set the BMC driver | "ipmi", "redfish", "redfish-virtualmedia" | "mixed" | | BMORELEASEBRANCH | BMO Release branch | "main", "release-0.4" | Set via jjb for CI, for local dev it gets default value based on CAPM3 branch | -| BOOT_MODE | Set libvirt firmware and BMH bootMode | "legacy", "UEFI", "UEFISecureBoot" | "legacy" | +| BOOT_MODE | Set libvirt firmware and BMH bootMode | "legacy", "UEFI", "UEFISecureBoot" | "UEFI" | | IMAGE_OS | OS of the image to boot the nodes from, overriden by IMAGE\_\* if set | "centos", "cirros", "FCOS", "ubuntu", "flatcar" | "centos" | | IMAGE_NAME | Image for target hosts deployment | | "CENTOS_9_NODE_IMAGE_K8S_${KUBERNETES_VERSION}.qcow2" | | IMAGE_LOCATION | Location of the image to download | | https://artifactory.nordix.org/artifactory/metal3/images/${KUBERNETES_VERSION} | diff --git a/vm-setup/roles/libvirt/defaults/main.yml b/vm-setup/roles/libvirt/defaults/main.yml index aed741c4f..4b1a7d818 100644 --- a/vm-setup/roles/libvirt/defaults/main.yml +++ b/vm-setup/roles/libvirt/defaults/main.yml @@ -15,7 +15,7 @@ libvirt_diskbus: scsi libvirt_cdrombus: sata libvirt_arch: x86_64 libvirt_cpu_mode: host-model -libvirt_firmware: bios +libvirt_firmware: uefi libvirt_secure_boot: false # Where to log serial console output