Open voltagex opened 1 year ago
https://gitlab.com/libvirt/libvirt/-/blob/master/src/qemu/qemu_firmware.c#L1857 - the error message was improved recently.
I don't think this is entirely a cockpit-machines issue, but it can definitely be improved by adding more configuration options to the UI
On Rawhide, I can get things working but I still need to modify the XML.
https://gist.github.com/voltagex/5623bf3e2123aad3243f4efd9b11d116
I guess I'm just debugging for myself at this point.
After enabling log_outputs="1:file:/var/log/libvirtd-debug.log" in /etc/libvirt/libvirtd.conf, I can see the following:
2023-10-01 07:32:38.410+0000: 47214: debug : qemuFirmwareMatchDomain:1208 : No matching path in '/usr/share/qemu/firmware/40-edk2-aarch64-secure-enrolled.json'
2023-10-01 07:32:38.410+0000: 47214: debug : qemuFirmwareMatchDomain:1284 : User refused Enrolled keys, firmware '/usr/share/qemu/firmware/40-edk2-x86_64-secure-enrolled.json' has them
2023-10-01 07:32:38.410+0000: 47214: debug : qemuFirmwareMatchDomain:1208 : No matching path in '/usr/share/qemu/firmware/50-edk2-aarch64-secure.json'
2023-10-01 07:32:38.410+0000: 47214: debug : qemuFirmwareMatchDomain:1208 : No matching path in '/usr/share/qemu/firmware/50-edk2-ovmf-4m-qcow2-x64-nosb.json'
2023-10-01 07:32:38.410+0000: 47214: debug : qemuFirmwareMatchDomain:1208 : No matching path in '/usr/share/qemu/firmware/50-edk2-x86_64-secure.json'
2023-10-01 07:32:38.410+0000: 47214: debug : qemuFirmwareMatchDomain:1208 : No matching path in '/usr/share/qemu/firmware/60-edk2-aarch64.json'
2023-10-01 07:32:38.410+0000: 47214: debug : qemuFirmwareMatchDomain:1208 : No matching path in '/usr/share/qemu/firmware/60-edk2-x86_64.json'
2023-10-01 07:32:38.410+0000: 47214: error : qemuFirmwareFillDomain:1856 : operation failed: Unable to find any firmware to satisfy 'efi'
Details pages do have an information card that does show BIOS / EFI, and there's already a way to edit some of the other values, so I think it's straightforward from a UI perspective.
It'd open up a modal with radios to switch between them.
(Note: There's a redesign planned where this area of the page will change. But this info will still be there in the redesign.)
If you're editing the XML to disable Secure Boot, on the following line
<loader readonly='yes' secure='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE_4M.ms.fd</loader>
you also have change secure='yes'
to secure='no'
to fully disable Secure Boot.
Unless I'm not looking in the right place, there is no way to change this from the cockpit side.
@rstat1 which led to https://gitlab.com/libvirt/libvirt/-/issues/544, yes.
Thanks though.
Just adding a couple more things here so I don't forget:
I am re-testing on Fedora 39.
Downloading & decompressing https://github.com/home-assistant/operating-system/releases/download/11.3/haos_ova-11.3.qcow2.xz
Let's say I go through the import workflow - the list of OSes here is different for import vs new!
Perhaps there could be some options here along the lines of Generic Linux, UEFI secure-boot
and Generic Linux, UEFI
Hit import & edit so I can change BIOS to UEFI (this screen doesn't note that this is your last chance to do this)
Interestingly with whatever combination of firmware exists on this system, I get the following screen instead of the shell this time:
virsh edit --domain homeassistant-test
shows the following configuration
<os firmware='efi'>
<type arch='x86_64' machine='pc-q35-8.1'>hvm</type>
<firmware>
<feature enabled='yes' name='enrolled-keys'/>
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash' format='qcow2'>/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2</loader>
<nvram template='/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2' format='qcow2'>/home/voltagex/.config/libvirt/qemu/nvram/homeassistant-test_VARS.qcow2</nvram>
<boot dev='hd'/>
</os>
Flipping the enrolled-keys and secure-boot feature to 'no', along with loader secure='no' leads to the error that I reported to libvirt - error: operation failed: Unable to find any firmware to satisfy 'efi'
- I realise this is not a cockpit-machines issue.
Hi, I've been struggling with the same issue as you and I discovered a way to fix it. You should also edit the
<firmware>
<feature enabled='no' name='enrolled-keys'/>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type'=pflash' format='qcow2'>/usr/share/edk2/ovmf/OVMF_CODE_4M.qcow2<loader>
<nvram template='/usr/share/edk2/ovmf/OVMF_VARS_4M.qcow2' format='qcow2'>/home/voltagex/.config/libvirt/qemu/nvram/homeassistant-test_VARS.qcow2</nvram>```
This configuration worked for me on Fedora 39
You can also press "any key" to enter the boot manager in the VM and then enter Device Manager (first option) and disable secure boot from the "Secure Boot Configutation" which is the third option.
Apologies for any errors in this issue, it's past 2am here.
the EFI shell starts and you get access denied if you try to manually start GRUB.
https://discuss.linuxcontainers.org/t/lxd-3-21-vm-efi-boot-error/6917 and others suggest this is an issue with Secure Boot.
If I try
virsh edit --domain home-assistant
I can see the followingIf I remove those feature keys, I get an error along the lines of
operation failed: Unable to find any firmware to satisfy 'efi'
I'm on Debian Testing.