Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37009 - Implement EFI for libvirt #9965

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Dec 21, 2023

By default this derives the firmware type from the PXE loader, just like VMware does.

It does not yet implement secure boot.

Depends on fog/fog-libvirt#134 to be released.

Currently only tested via the API, not the UI.

By default this derives the firmware type from the PXE loader, just like
VMware does.

It does not yet implement secure boot.
@ekohl
Copy link
Member Author

ekohl commented Mar 11, 2024

@stejskalleos @nofaralfasi could you have a look at this and fog/fog-libvirt#134?

Comment on lines +8 to +10
<%= field(f, :firmware, :disabled => !new_vm, :label => _('Firmware'), :label_size => "col-md-2") do
compute_resource.firmware_types.collect do |type, name|
radio_button_f f, :firmware, {:disabled => !new_vm, :value => type, :text => _(name)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be:

Suggested change
<%= field(f, :firmware, :disabled => !new_vm, :label => _('Firmware'), :label_size => "col-md-2") do
compute_resource.firmware_types.collect do |type, name|
radio_button_f f, :firmware, {:disabled => !new_vm, :value => type, :text => _(name)}
<%= field(f, :os_firmware, :disabled => !new_vm, :label => _('Firmware'), :label_size => "col-md-2") do
compute_resource.firmware_types.collect do |type, name|
radio_button_f f, :os_firmware, {:disabled => !new_vm, :value => type, :text => _(name)}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the controller accepts firmware (just like the VMware side). The libvirt model then converts the option to what fog-libvirt accepts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to consider VMware here? I don't see the necessity for VMware and Libvirt forms to have the same naming convention.
If we keep it as it is, we encounter the following error: Failure: undefined method firmware for <Fog::Libvirt::Compute::Server ...

Copy link
Contributor

@nofaralfasi nofaralfasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkbox only works when creating the VM. Once the VM is created, the checkbox remains unchecked.
I'm using OVMF, so I couldn't test the entire workflow.

@ekohl
Copy link
Member Author

ekohl commented Apr 9, 2024

The checkbox only works when creating the VM. Once the VM is created, the checkbox remains unchecked.

This is a good point. I'm not sure if we actually support changing it, so perhaps we should hide the element on edit.

During the review we also noticed that the VMware compute resource card shows the firmware type, which this should also implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants