Bug 1997882 - RFE: Prefer UEFI for new VMs
Summary: RFE: Prefer UEFI for new VMs
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1997884 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-26 01:20 UTC by Neal Gompa
Modified: 2024-11-13 18:48 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
: 1997883 (view as bug list)
Environment:
Last Closed: 2024-11-13 18:48:16 UTC
Type: Enhancement
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure cloud-sig issue 345 0 None None None 2021-08-26 01:58:51 UTC

Description Neal Gompa 2021-08-26 01:20:18 UTC
Description of problem:
The Fedora Cloud WG recently changed to offering hybrid boot cloud images. This was done as the start of a longer-term effort to engage with the community and partners to boot Fedora images with UEFI. As part of this effort, we'd like to have the virt stack default to offering UEFI for VMs (with a CSM for BIOS backward compatibility if possible).

It would be appreciated if virt-manager defaulted to creating VMs with UEFI+CSM for "fedora", "unknown linux" and other similar things.

Additional info:
The full discussion about this is in the Fedora Cloud WG meeting logs here: https://meetbot.fedoraproject.org/teams/fedora_cloud_meeting/fedora_cloud_meeting.2021-08-19-14.59.log.html

Comment 1 Neal Gompa 2021-08-26 01:58:51 UTC
Here's the ticket for this in the Fedora Cloud WG tracker: https://pagure.io/cloud-sig/issue/345

Comment 2 Daniel Berrangé 2021-08-27 08:50:55 UTC
Note that using UEFI will break ability to use internal snapshots of VMs. This is the main reason why GNOME Boxes only uses UEFI in cases where the guest OS does not support legacy BIOS. We have done QEMU work needed to lift this limitation, but still need libvirt work done.

Comment 3 Neal Gompa 2021-08-27 11:32:32 UTC
(In reply to Daniel Berrangé from comment #2)
> Note that using UEFI will break ability to use internal snapshots of VMs.
> This is the main reason why GNOME Boxes only uses UEFI in cases where the
> guest OS does not support legacy BIOS. We have done QEMU work needed to lift
> this limitation, but still need libvirt work done.

Good to know! For what it's worth, this is the kind of info I hoped to get as part of filing these BZs. Obviously, we'd like functional parity before switching defaults.

Comment 4 Cole Robinson 2022-02-21 14:18:59 UTC
*** Bug 1997884 has been marked as a duplicate of this bug. ***

Comment 5 Daniel Berrangé 2022-02-21 17:25:48 UTC
To expand on my earlier comment and repeat what I've written in other places....

Using UEFI by default is fraught with edge cases. 

If an OS explicitly drops support for using UEFI  then we can express this in libosinfo and do the right thing to use UEFI by default. This is needed since Windows 11 for example. This is the easy case.

If an OS supports both BIOS/UEFI then it is much harder.

If launching an installer to provision a new VM we could possibly run it in UEFI mode, *IF* we know it is run interactively. 

For a non-interactive install there's no reliable default. In Fedora case we're at the mercy of whatever the user wrote in their kickstart file as to whether its going to try to do a UEFI or BIOS install. 

If importing a pre-existing disk image (eg cloud image), then even if the OS vendor is building their official cloud images with dual UEFI/BIOS support we can't assume we have an official image. Users often build their own customized images and so we're again susceptible to whatever junk they put into their kickstart files.

In both cases, using BIOS by default is the safer option, unless we've been told to turn on a feature that implies UEFI. eg if user asks for secureboot, then obviously we'll need UEFI.


IOW, if Fedora explicitly drops BIOS support then UEFI is easy.  As long as BIOS support exists, then defaulting to BIOS is generally better.

Comment 6 Cole Robinson 2024-11-13 18:48:16 UTC
This bug has lingered for 2.5 years. I'm closing it, but I've filed an upstream virt-install issue to track some of the technical work we would need for this: https://github.com/virt-manager/virt-manager/issues/757 

But I don't think this is a change virt-install/virt-manager should make in isolation. If someone wanted to make this happen for Fedora, might be interesting to file a Feature for it and open it up to broader discussion.


Note You need to log in before you can comment on or make changes to this bug.