Changing EFI boot order via API

Hello, I would like to be able to change the boot order of an EFI VM via libvirt API. Specifically, I am looking into configuring a VM to boot over HTTP UEFI Boot or HTTPS UEFI Boot (also available as HTTP IPv4 in the firmware). Is this possible? I cannot find anything relevant in the documentation. Thanks. -- Later, Lukas @lzap Zapletal

On 6/12/23 15:38, Lukas Zapletal wrote:
Hello,
I would like to be able to change the boot order of an EFI VM via libvirt API. Specifically, I am looking into configuring a VM to boot over HTTP UEFI Boot or HTTPS UEFI Boot (also available as HTTP IPv4 in the firmware).
Is this possible? I cannot find anything relevant in the documentation. Thanks.
It is possible. Just use <boot order=''/> for individual devices, or: <os> <boot dev='net'/> </os> https://libvirt.org/formatdomain.html#specifying-boot-order https://libvirt.org/formatdomain.html#bios-bootloader Michal

It is possible. Just use <boot order=''/> for individual devices, or:
Thanks for the reply, Michal. As I said, I am looking into changing boot order within the firmware, PXEv4, PXEv6, HTTPv4 and HTTPv6 is the default order I don’t like (as there is no PXE on my network). I have found two solutions tho. virt-fw-vars -i /usr/share/OVMF/OVMF_VARS.fd --set-boot-uri http://nuc.home.lan:8000/boot/shim.efi -o /var/lib/libvirt/qemu/nvram/mydomain_VARS.fd This command allows me to do HTTPv4 directly (once). It cannot be done via the libvirt API though. But then kraxel recommended me to configure PXE to return a non-existing file, this makes the EFI firmware skip the first two options pretty quickly (in 2 seconds) so that solved the problem pretty much. Thanks all! -- Later, Lukas @lzap Zapletal
participants (2)
-
Lukas Zapletal
-
Michal Prívozník