Compute resources -> compute profiles: firmware setting is ignored

Problem:
When creating a VM from a template using Foreman and using a compute profile, the setting under firmware (auto / BIOS / UEFI / UEFI secure boot) is ignored. No matter what you try to set here in the profile, it disappears after saving and reverts to auto (which results in BIOS mode).

Expected outcome:
right mode is saved/used

Foreman and Proxy versions:
3.16/4.18

I think it was kind of present also on earlier versions but 3.16 seems to trigger it more often. Sometimes I’m pretty sure I did switch the firmware to UEFI but the vm which is built still ends up with BIOS configured but couldn’t find a way to trigger it.

the issue is present twice in the UI.
Once for the compute profiles itself where the settings are not properly loaded/selected in UI. But it seems they are properly saved in the profile as visible via hammer cli.
And a second time during creation of a new host in the tab “virtual machine” where again it defaults/sets to automatic and therefore resulting in BIOS per default.

doesn’t how you create the image have an impact on this ?

virtual machine image is created within VMware environment and has EFI configured there. If creating a new host based on that image Foreman UI doesn’t load the Firmware Setting properly from compute-profile but selects “automatic” by default (tip in UI says “
Choose ‘Automatic’ to set the firmware based on the PXE Loader. If no PXE Loader is selected, it defaults to BIOS.”)
So without changing the Firmware part manually to UEFI the cloned image will not boot after deploymen as its configured with BIOS instead of (U)EFI

As compute profile has the firmware configured properly and all other info like cpu, ram, cluster etc is loaded properly I guess its a Bug in the UI.

replying again to myself.
When pressing the “Submit” button to create the host and and error occurs (e.g. because the hostname exists already) the firmware settings are resetted in the gui. So if UEFI was selected but error occured, I delete the existing host in new tab and repress Submit it will build the VM with BIOS instead of UEFI.

Also I found some screenshots from earlier versions of foreman where the issue wasn’t present.
At the times there were only three option to choose from. Automatic, BIOS and EFI.

My guess would be that with renaming of EFI to UEFI and adding UEFI Secure Boot it was missed to adapt the loading of the templates to the new names.

@MariaAga might you take a look?

Also it seems that at least for vmware the cores per settings is ignored and it will only deploy virtual cores as configured within “CPUs”

1 Like

Thanks for the tag, I created https://issues.redhat.com/browse/SAT-39908 for it

possible fix: Fixes #37834 - Set Firmware selection correct by sbernhard ¡ Pull Request #10550 ¡ theforeman/foreman ¡ GitHub