From 49c33e0a73643da543f042a6354c10566f81d166 Mon Sep 17 00:00:00 2001
From: Pierre Riteau <pierre@stackhpc.com>
Date: Fri, 23 Aug 2024 14:52:39 +0200
Subject: [PATCH] seed-vm/infra-vms: Use efi as default

Change-Id: I7d71689ef9b5a8a092fe78da4ee3d2a645a1316e
---
 ansible/inventory/group_vars/all/infra-vms             |  4 ++--
 ansible/inventory/group_vars/all/seed-vm               |  4 ++--
 etc/kayobe/infra-vms.yml                               |  2 +-
 etc/kayobe/seed-vm.yml                                 |  2 +-
 .../seed-infra-vm-efi-default-9b2114a4e2fb4b8a.yaml    | 10 ++++++++++
 5 files changed, 16 insertions(+), 6 deletions(-)
 create mode 100644 releasenotes/notes/seed-infra-vm-efi-default-9b2114a4e2fb4b8a.yaml

diff --git a/ansible/inventory/group_vars/all/infra-vms b/ansible/inventory/group_vars/all/infra-vms
index 569ab6b73..85fb39602 100644
--- a/ansible/inventory/group_vars/all/infra-vms
+++ b/ansible/inventory/group_vars/all/infra-vms
@@ -76,8 +76,8 @@ infra_vm_wait_connection_ssh_extra_args: '-o StrictHostKeyChecking=no'
 # OS family. Needed for config drive generation.
 infra_vm_os_family: "{{ 'RedHat' if os_distribution in ['centos', 'rocky'] else 'Debian' }}"
 
-# Boot firmware. Possible values are 'bios' or 'efi'. Default is 'bios'.
-infra_vm_boot_firmware: "bios"
+# Boot firmware. Possible values are 'bios' or 'efi'. Default is 'efi'.
+infra_vm_boot_firmware: "efi"
 
 # Machine type. Libvirt default configuration is used.
 infra_vm_machine:
diff --git a/ansible/inventory/group_vars/all/seed-vm b/ansible/inventory/group_vars/all/seed-vm
index 953d580fd..0f8368bf6 100644
--- a/ansible/inventory/group_vars/all/seed-vm
+++ b/ansible/inventory/group_vars/all/seed-vm
@@ -66,8 +66,8 @@ seed_vm_data_format: qcow2
 # List of network interfaces to attach to the seed VM.
 seed_vm_interfaces: "{{ network_interfaces | sort | map('net_libvirt_vm_network') | list }}"
 
-# Boot firmware. Possible values are 'bios' or 'efi'. Default is 'bios'.
-seed_vm_boot_firmware: "bios"
+# Boot firmware. Possible values are 'bios' or 'efi'. Default is 'efi'.
+seed_vm_boot_firmware: "efi"
 
 # Machine type. Libvirt default configuration is used.
 seed_vm_machine:
diff --git a/etc/kayobe/infra-vms.yml b/etc/kayobe/infra-vms.yml
index ba75c641c..23ab7b8ae 100644
--- a/etc/kayobe/infra-vms.yml
+++ b/etc/kayobe/infra-vms.yml
@@ -58,7 +58,7 @@
 # OS family. Needed for config drive generation.
 #infra_vm_os_family:
 
-# Boot firmware. Possible values are 'bios' or 'efi'. Default is 'bios'.
+# Boot firmware. Possible values are 'bios' or 'efi'. Default is 'efi'.
 #infra_vm_boot_firmware:
 
 # Machine type. Libvirt default configuration is used.
diff --git a/etc/kayobe/seed-vm.yml b/etc/kayobe/seed-vm.yml
index 5fdcc1690..25b0c72ec 100644
--- a/etc/kayobe/seed-vm.yml
+++ b/etc/kayobe/seed-vm.yml
@@ -61,7 +61,7 @@
 #
 #seed_vm_interfaces:
 
-# Boot firmware. Possible values are 'bios' or 'efi'. Default is 'bios'.
+# Boot firmware. Possible values are 'bios' or 'efi'. Default is 'efi'.
 #seed_vm_boot_firmware:
 
 # Machine type. Libvirt default configuration is used.
diff --git a/releasenotes/notes/seed-infra-vm-efi-default-9b2114a4e2fb4b8a.yaml b/releasenotes/notes/seed-infra-vm-efi-default-9b2114a4e2fb4b8a.yaml
new file mode 100644
index 000000000..60888b725
--- /dev/null
+++ b/releasenotes/notes/seed-infra-vm-efi-default-9b2114a4e2fb4b8a.yaml
@@ -0,0 +1,10 @@
+---
+upgrade:
+  - |
+    Changes the default boot firmware for seed and infra VMs to ``efi``. Set
+    ``infra_vm_boot_firmware`` and ``seed_vm_boot_firmware`` to ``bios`` to
+    retain existing behaviour.
+fixes:
+  - |
+    Fixes compatibility with Rocky Linux 9.4 GenericCloud images by switching
+    to ``efi`` boot firmware.