You are not logged in.
Hi there,
after yesterdays update I find myself unable to launch any virtual machine.
sudo virsh start [VM NAME]
yields the following error message:
error: Failed to start domain '[VM NAME]'
error: operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
I have no idea what this is about. I assume that the edk2 UEFI file I've been using (`/usr/share/edk2/OVMF_VARS.fd`) is no longer supported by libvirt?
I'd be happy for any advice.
Offline
Same issue. I downgraded edk2-ovmf back to 202311-1 and everything is working for me again.
Offline
Same issue. I downgraded edk2-ovmf back to 202311-1 and everything is working for me again.
While downgrading libvirt didn't solve the issue, downgrading edk2-ovmf did. Thanks for the hint! And glad I'm not the only one experiencing this.
Offline
The edk2-ovmf package shows a notice on upgrade:
>>> The CSM support has been removed upstream in version 202402.
The 2MB firmware files have been removed in favor of the 4MB ones as the new default.
Virtual machine setups may need to be adapted!
The old firmware-files I use are no longer part of the package. I could just switch to the 4MB versions without any problems.
You could try to edit the config-files for the VMs with virsh and change the paths.
For me it was just switching two paths around. Quite possible, that you need to look for some other files in /usr/share/edk2/...:
virsh -c qemu:///system edit $VMname
/usr/share/edk2/x64/OVMF_CODE.fd -> /usr/share/edk2/x64/OVMF_CODE.4m.fd
/usr/share/edk2/x64/OVMF_VARS.fd -> /usr/share/edk2/x64/OVMF_VARS.4m.fd
Afterwards my VM was booting regularly.
Offline
That did not work for me.
I was not able to edit and change to the 4m file. The editor is refusing to save.
I get the following error:
error: operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
Failed. Try again? [y,n,i,f,?]
Also copying the old 2m files to the edk2 directory does not solve the issue.
Any Ideas how to change the 2m efi to the 4m bios file. Editing does not work.
Last edited by odror (2024-11-08 22:32:50)
Offline
https://wiki.archlinux.org/title/Libvirt#UEFI_support doesn't mention 2m files , just 4m files .
That section hasn't changed since dec 2023 .
Why are people using .2m files ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
The edk2-ovmf package shows a notice on upgrade:
>>> The CSM support has been removed upstream in version 202402.
The 2MB firmware files have been removed in favor of the 4MB ones as the new default.
Virtual machine setups may need to be adapted!The old firmware-files I use are no longer part of the package. I could just switch to the 4MB versions without any problems.
You could try to edit the config-files for the VMs with virsh and change the paths.
For me it was just switching two paths around. Quite possible, that you need to look for some other files in /usr/share/edk2/...:
virsh -c qemu:///system edit $VMname /usr/share/edk2/x64/OVMF_CODE.fd -> /usr/share/edk2/x64/OVMF_CODE.4m.fd /usr/share/edk2/x64/OVMF_VARS.fd -> /usr/share/edk2/x64/OVMF_VARS.4m.fd
Afterwards my VM was booting regularly.
Can confirm. Adding "4m." to the lines via
sudo virsh edit [VM NAME]
did solve the issue for me.
Offline
Can confirm. Adding "4m." to the lines via
sudo virsh edit [VM NAME]
did solve the issue for me.
That did not work for me. The editor is refusing to save and exit. Any ideas why? is there additional setup issue that I need. My guest is W11. Can that be the issue?
Offline
Can confirm. Adding "4m." to the lines via
sudo virsh edit [VM NAME]
did solve the issue for me.
That did not work for me. The editor is refusing to save and exit. Any ideas why? is there additional setup issue that I need. My guest is W11. Can that be the issue?
Did you reverse your downgrade beforehand?
Offline
Did you reverse your downgrade beforehand?
Let understand it. Do you mean that I need to reverse the update first. Then edit the VM and finally do the upgrade. So editing the machine xml needs to be done BEFORE the upgrade.
Offline
Did you reverse your downgrade beforehand?
Let understand it. Do you mean that I need to reverse the update first. Then edit the VM and finally do the upgrade. So editing the machine xml needs to be done BEFORE the upgrade.
I did that. I am still getting an error:
error: operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
Failed. Try again? [y,n,i,f,?]:
Do I need to reverse libvirt as well before editing? Anything else I need to reverse?
Offline
Did you reverse your downgrade beforehand?
Let understand it. Do you mean that I need to reverse the update first. Then edit the VM and finally do the upgrade. So editing the machine xml needs to be done BEFORE the upgrade.
No, from what I understood you downgraded the OVMF package initially? Revert that downgrade, so all your packages are up-to-date. Then change the lines in the VM's config!
Offline
Same problem here. Can't use virsh because
virsh -c qemu:///system edit HomeAssistant
error: failed to get domain 'HomeAssistant'
and editing the XML in VirtManager cannot Apply, because trying to add ".4m" to this section
<os firmware="efi">
<type arch="x86_64" machine="pc-q35-9.0">hvm</type>
<firmware>
<feature enabled="no" name="enrolled-keys"/>
<feature enabled="no" name="secure-boot"/>
</firmware>
<loader readonly="yes" type="pflash">/usr/share/edk2/x64/OVMF_CODE.fd</loader>
<nvram template="/usr/share/edk2/x64/OVMF_VARS.fd">/var/lib/libvirt/qemu/nvram/HomaAssistant_VARS.fd</nvram>
<bootmenu enable="no"/>
</os>
fails like so
Error changing VM configuration: operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/addhardware.py", line 345, in change_config_helper
define_func(**define_args)
File "/usr/share/virt-manager/virtManager/details/details.py", line 1353, in change_cb
return self.vm.define_xml(newxml)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 347, in define_xml
self._redefine_xml_internal(origxml, newxml)
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 374, in _redefine_xml_internal
self._define(newxml)
File "/usr/share/virt-manager/virtManager/object/domain.py", line 1137, in _define
self.conn.define_domain(xml)
File "/usr/share/virt-manager/virtManager/connection.py", line 554, in define_domain
return self._backend.defineXML(xml)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/libvirt.py", line 4559, in defineXML
raise libvirtError('virDomainDefineXML() failed')
libvirt.libvirtError: operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
I did not downgrade the package at any point.
Offline
Hmm. Did you change this line here:
/usr/share/edk2/x64/OVMF_CODE.fd
to
/usr/share/edk2/x64/OVMF_CODE.4m.fd
in both instances?
Notice that the "4m" addition must be written between "CODE" and the file ending "fd"
Honestly I can't help you any further. I did this with all four of my VMs and it worked with each one on first try :-/
Offline
Hah! I did not notice the second instance. Changed them both and now it's working. Thanks!
Offline
The edk2-ovmf package shows a notice on upgrade:
>>> The CSM support has been removed upstream in version 202402.
The 2MB firmware files have been removed in favor of the 4MB ones as the new default.
Virtual machine setups may need to be adapted!The old firmware-files I use are no longer part of the package. I could just switch to the 4MB versions without any problems.
You could try to edit the config-files for the VMs with virsh and change the paths.
For me it was just switching two paths around. Quite possible, that you need to look for some other files in /usr/share/edk2/...:
virsh -c qemu:///system edit $VMname /usr/share/edk2/x64/OVMF_CODE.fd -> /usr/share/edk2/x64/OVMF_CODE.4m.fd /usr/share/edk2/x64/OVMF_VARS.fd -> /usr/share/edk2/x64/OVMF_VARS.4m.fd
Afterwards my VM was booting regularly.
I can confirm, this solved the issue for me. Thanks for being kind and sharing the solution with us!
Last edited by pwish (2024-11-14 07:35:36)
ermmm actually. you didn't read the wiki probably....
Offline
In my case, there is somthing to do after correcting the xml file:
1. cp /var/lib/libvirt/qemu/nvram/<VMNAME>_VARS.fd{,.bak}
2 download 2M_VARS-to-4M_VARS.sh and replace the variable NEW_VAR_TEMPLATE: /usr/share/OVMF/OVMF_VARS_4M.fd -> /usr/share/edk2/x64/OVMF_VARS.4m.fd
3 replace VARS: bash 2M_VARS-to-4M_VARS.sh -i /var/lib/libvirt/qemu/nvram/<VMNAME>_VARS.fd # (the script will overwrite <VMNAME>_VARS.fd)
4 cp /var/lib/libvirt/qemu/nvram/<VMNAME>_VARS.fd /var/lib/libvirt/qemu/nvram/<VMNAME>_VARS.4m.fd
Ref:
1. Finding EFI Firmware That Is Compatible
2. 2M_VARS-to-4M_VARS.sh: https://salsa.debian.org/qemu-team/edk2 … 4M_VARS.sh
Offline
In my case, there is somthing to do after correcting the xml file:
You're a life saver. I had to install the virt-firmware for the script to work (for the virt-fw-vars command).
Thanks.
Some more context and information in the package notes would be useful though.
Libvirt is already above-average hard to set up in a good way, and stuff like this doesn't help.
Offline