After upgrading to Fedora 42 from Fedora 41, my system failed to boot my existing virtual machine which was running Debian 12 and was installed in a qcow2 disk image. The Debian VM successfully boot into shimx64 and load the linux kernel but get stuck at ‘loading init ramdisk’. I have tried to tweaks some settings like turn off ‘3D acceleration’, increasing ‘vCPU’ and ‘memory’ but nothing seems to works. The issue also present when tested in Fedora 42 live image. As soon as I reinstall the system back to Fedora 41, the virtual machine successfully booted. Does anyone have any suggestion on how to troubleshoot the issue? Thank you.
I have a debian11 and old debiantesting qcow2 images that still boot for me.
Can you edit the grub command line and remove rhgb and quiet options.
Do you see kernel messages? What does the kernel report?
Thanks for the suggestion. In my version, the original grub command didn’t have the rhgb option. After I removed the quiet option, the boot process still got stuck at the message ‘loading initial ramdisk …’. In a normal boot, which I tried again in Fedora 41, right after ‘loading initial ramdisk …’ screen, the system quickly output a series of console messages and successfully boot. Something I noticed is that everytime the VM get stuck, my CPU usage shoot up.
I’m having this issue as well. Are your VMs running Debian with UEFI firmware? With Secureboot? My two Debian VMs with BIOS are fine on Fedora 42; however my three Debian VMs with UEFI are stuck at ‘loading init ramdisk’. I reverted back to 41 for the time being. Still haven’t found an answer.
Right now I’m reading into the following unrelated things, looking for answers.
Edit: The Fedora EDK2Security changes might be the source of our problems. If you read down to the “ Upgrade/compatibility impact” section, it says
Running outdated guests might require a VM config update, see Changes/Edk2Security - Fedora Project Wiki
Hi, thanks for the suggestion. As I mentioned, I already remove ‘quiet’ parameter but the boot process still get stuck so no helpful debug message will show. I also tried to switch to QXL but that also doesn’t work either. I don’t think this is video related problem as the screen still show the grub screen when booting, so installing vulkan-virtio probably won’t solve the issue. But thanks for the suggestion.
Hi, thanks for sharing. That is exactly my problem. My VMs are also running Debian with UEFI firmware and SecureBoot. I didn’t have any VM running BIOS so I didn’t know this. I have tried to disable secureboot in vm firmware setting but it still doesn’t fix the issue. Like you I’m staying with 41 for now.
So I just got my VMs working on Fedora 42!
Yes, it was the changes to “edk2 security” in F42 that caused my issue. My Debian 12 VMs have UEFI set as the firmware in kvm, but the guests do not have secure boot enabled themselves. I confirmed this by loading up a VM in F41 and running mokutil --sb-state . It returned Secureboot is disabled
. To get things back up and running without secure boot in the VMs, I performed the following: Word of warning, I make no guarantee that this will work on all systems. Make backups of data and configs, and perform at your own risk!
- Shutdown all the VMs
- Edited the libvirt XML file with virsh
- Delete some lines and add new ones according to the Changes/Edk2Security wiki page.
- Checked to see if the XML file properly repopulated.
- Upgraded to Fedora 42
- VMs booted successfully
Here is my terminal prompts as an example:
sudo su
EDITOR=nano virsh edit WebDev_Debian
Deleted from the <os firmware='efi'>
section.
<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' templateFormat='qcow2' format='qcow2'>/var/lib/libvirt/qemu/nvram/WebDev_Debian_VARS.qcow2</nvram>
Add this instead:
<firmware>
<feature enabled='no' name='secure-boot'/>
</firmware>
CTRL+X to save. Say Yes to accept changes. You should then be give a prompt saying configuration changes have be successfully made. Then reopened the file to confirm changes and see that it autopopulated an expanded entry.
EDITOR=nano virsh edit WebDev_Debian
<os firmware='efi'>
<type arch='x86_64' machine='pc-q35-9.1'>hvm</type>
<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' templateFormat='qcow2' format='qcow2'>/var/lib/libvirt/qemu/nvram/WebDev_Debian_VARS.qcow2</nvram>
<boot dev='hd'/>
</os>
Upgrade to Fedora 42 and the Debian UEFI without secureboot VMs should load. At least mine did. Hope this helps.
Thank you so much for sharing this. It worked on my end as well. Just wanted to add that you can also enable xml editing in virt-manager and make the change in the xml tab which also validate your changes so that if you mistype something, it will stop the change and let you know (this is prefered for people who are not familiar with command line). once again, thank you now I can upgrade to f42.