Project

General

Profile

Actions

Bug #37834

closed

Automatic firmware selection for VMware is not working on the `compute_attributes` form

Added by Nofar Kirshon over 1 year ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

When selecting the `Automatic` firmware type on the `compute_attributes` form, it is incorrectly changed to `BIOS`, which is the default firmware type when no specific firmware is selected.

This issue occurs because the `compute_attributes` form shares the `_base.erb` template with the host form, where `Automatic` firmware is valid and converted to a specific firmware type based on the selected `PXE Loader`. However, in the `compute_attributes` form we don't pass the `PXE Loader`, and when the firmware type is passed to the VM object, `Automatic` is not a valid value.

Steps to reproduce:
1. Have a compute resource of type VMware created.
2. Create a compute profile of any type.
3. Choose `Automatic` firmware and save the form.
4. Click on the new compute profile you created and see that the firmware is set to `BIOS` instead of `Automatic`.

Actions #1

Updated by Nofar Kirshon over 1 year ago

Note:
This issue is currently affecting only VMware compute resources. However, once the Firmware option is added to other compute resources, they will likely experience the same problem - see #10321 comment.

Actions #2

Updated by The Foreman Bot 12 months ago

  • Status changed from New to Ready For Testing
  • Assignee set to Bernhard Suttner
  • Pull request https://github.com/theforeman/foreman/pull/10529 added
Actions #3

Updated by The Foreman Bot 11 months ago

  • Pull request https://github.com/theforeman/foreman/pull/10550 added
Actions #4

Updated by nlaphine Hine 5 months ago

Creating EFI based Virtual Machines with the Host Group set to EFI results in a VM with BIOS firmware. The VM cannot boot properly until the VM is adjusted manually to have the EFI firmware.

Noting the text above about `PXE Loader` not being available at UI time for a compute attribute, it is available for host creation. The problem might be a bit bigger than just the UI not showing the right firmware.

Also note, setting the firmware to a value that is not "Automatic", is retained in the object's DB entry, but the change is not reflected in the UI.
Hammer shows it is set correctly, so therefore the object's DB entry WAS updated correctly.

hammer compute-profile show --id 3
Id: 3
Name: 3-Large
Created at: 2025/11/13 03:54:37
Updated at: 2025/11/13 03:54:37
Compute attributes:
1) Id: 3
Name: 1 CPUs and 2048 MB memory
Compute Resource: VCentre
VM attributes: {"cpus"=>"1", "corespersocket"=>"1", "memory_mb"=>"2048", "firmware"=>" uefi ", "cluster"=>"", "path"=>"/Datacenters/ParkesDatacenter/vm", "guest_id"=>"otherGuest", "hardware_version"=>"Default", "memoryHotAddEnabled"=>"0", "cpuHotAddEnabled"=>"0", "add_cdrom"=>"0", "boot_order"=>["network", "disk"], "annotation"=>"", "virtual_tpm"=>"0", "interfaces_attributes"=>{"0"=>{"type"=>"VirtualE1000", "network"=>"dvportgroup-1140"}}}

Actions #5

Updated by The Foreman Bot 5 months ago

  • Fixed in Releases 3.18.0 added
Actions #6

Updated by Ewoud Kohl van Wijngaarden 5 months ago

  • Red Hat JIRA set to SAT-39908
Actions #7

Updated by Bernhard Suttner 5 months ago

  • Status changed from Ready For Testing to Closed
Actions #8

Updated by The Foreman Bot 4 months ago

  • Pull request deleted (https://github.com/theforeman/foreman/pull/10529, https://github.com/theforeman/foreman/pull/10550)
Actions

Also available in: Atom PDF