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

No ability to create libvirt KVM virtual machine instances with uefi support #128

Open
rhjyoung opened this issue Jul 7, 2023 · 4 comments

Comments

@rhjyoung
Copy link

rhjyoung commented Jul 7, 2023

Currently fog-libvirt only supports ability to create virtual machines via libvirt that are BIOS based. BIOS is slowly being deprecated on with Linux distributions. While Windows 11 no longer supports it all together.

Foreman currently relies on fog-libvirt to create virtual machines from a libvirt compute resource. Currently it can only support creation of BIOS based KVM virtual machines.

Enabling a way to specify creation of libvirt KVM instances with UEFI will resolve this issue.

https://community.theforeman.org/t/libvirt-and-uefi/22756

@ekohl
Copy link
Contributor

ekohl commented Nov 10, 2023

On a related note, #132 would at least clean up the UEFI bits on deletion.

@ekohl
Copy link
Contributor

ekohl commented Dec 20, 2023

https://libvirt.org/formatdomain.html#bios-bootloader describes how to do this. The simplest way to enable EFI is to select the right firmware

<os firmware="efi">
  # ...
</os>

Additionally, secure boot can be enabled with <loader secure='yes'/> and there's also stateless for AMD SEV <loader stateless='yes'/>. Stateless also means you can't store any configuration, but I don't know if that's needed. I saw very little configurable options when I played with it the last time.

Big question is, how to expose this. I suppose an attribute os_firmware is a good start. By default nil, but can be used to explicitly set either bios or efi. But then the loader. I'd like to avoid fully exposing all the options for now and simply say you can opt in for either secure or stateless (with qemu 8.6.0+).

@ekohl
Copy link
Contributor

ekohl commented Dec 20, 2023

After playing around with this for a while I think #134 implements this. Please have a look.

@jeroney
Copy link

jeroney commented Dec 20, 2023

@ekol this seems about right. Now just needs to pass all the pipline checks. It wants double quotes instead of single quotes.

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

Successfully merging a pull request may close this issue.

3 participants