Combined OVMF code and vars file

bhaskaraba

New Member
Mar 8, 2024
4
0
1
Hello,

I have a customized UEFI code file (OVMF-code.fd) and a customized UEFI vars file (OVMF-vars.fd) seperately that I need to attach to the VM instance. AFAIK, the "efidisk0" argument takes only the UEFI vars file. So, my question is:

1. There is "-pflash" option available in 'qemu-system-x86_64', using which we can attach both the code file and vars file seperately, something like this:
-drive if=pflash,format=raw,unit=0,file=$OVMF-bin.fd,readonly=on \
-drive if=pflash,format=raw,unit=1,file=$OVMF-vars.fs \
So, how do we achieve this in qm/proxmox ?

2. If the above is not supported in proxmox, then is there any tool which can convert these 2 files into a single file and hence I can attach it using the "efidisk0" argument for qm ?

Thank you.
Bhaskara.
 
We do not have an "official" way to use a custom firmware image with a custom vars file. It can however still be done:
  • Disable OVMF by setting bios: seabios
  • Configure the custom arguments in /etc/pve/qemu-server/<vmid>.conf
    Code:
    args: -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/path/to/OVMF_CODE_4M.fd' -drive 'if=pflash,unit=1,format=raw,file=/path/to/OVMF_VARS_4M.fd'
 
  • Like
Reactions: bhaskaraba
We do not have an "official" way to use a custom firmware image with a custom vars file. It can however still be done:
  • Disable OVMF by setting bios: seabios
  • Configure the custom arguments in /etc/pve/qemu-server/<vmid>.conf
    Code:
    args: -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/path/to/OVMF_CODE_4M.fd' -drive 'if=pflash,unit=1,format=raw,file=/path/to/OVMF_VARS_4M.fd'

Great!! Thanks a lot Filip for you quick reply and suggestion. I will try this out. Thanks again.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!