[Bug] V2P: Firmware "Auto" skips efidisk0 after live mirror (bios_override 'auto' wins over detected ovmf)
Describe the bug
With BIOS/Firmware left on "Auto" and an EFI source, a live mirror migration ends with bios: ovmf but no efidisk0. On every start PVE warns WARN: no efidisk configured! Using temporary efivars disk., so boot entries and Secure Boot state are not persisted. A Linux guest still boots via the fallback loader; with firmware explicitly set to UEFI the efidisk is created.
Cause in pegaprox/core/v2p.py (same in v1.4.1 and Testing):
bios = getattr(task, 'bios_override', None) or getattr(task, '_detected_bios', 'seabios')
bios_override defaults to the string 'auto' (self.config.get('bios', 'auto')), which is truthy, so bios becomes 'auto' and the following if bios == 'ovmf': block (bios/machine reset, efidisk0, BOOTX64.EFI fallback) is skipped. _detected_bios ('ovmf' here) is never used.
The line appears twice:
_do_sshfs_boot_migration(live mirror, post-pivot block) – reproduced_do_offline_qemuimg_copy– same pattern, not reproduced (my offline runs used the SSH dd path, which allocated the efidisk)
Possible fix:
bios = getattr(task, 'bios_override', None)
if not bios or bios == 'auto':
bios = getattr(task, '_detected_bios', 'seabios')
Steps to Reproduce
- Source VM on ESXi with
firmware=efi(Debian 13 here), powered on. - Migrate to PVE, transfer mode "Live Mirror", BIOS/Firmware Auto.
qm config <vmid> | grep -E '^(bios|machine|efidisk0)'→bios: ovmf,machine: q35, noefidisk0.qm start/qm reboot→WARN: no efidisk configured! Using temporary efivars disk.
Same migration with firmware explicitly "UEFI (OVMF)": efidisk0 is created (with pre-enrolled-keys=0).
Expected behavior
"Auto" resolves to the detected firmware, and an EFI source gets a persistent efidisk0 like with explicit UEFI.
Environment
- PegaProx Version: 1.4.1 (build 2026.10.24)
- Installation Method: Debian package (pegaprox 1.4.1-1); for this run additionally the
v2p.pyhunk of PR #1255 applied (only adds discard/ssd to disk attach options, unrelated) - OS: Debian 13 (trixie)
- UI? Corporate
Logs
VMware hardware: firmware=efi, scsi=vim.vm.device.ParaVirtualSCSIController, nic=vim.vm.device.VirtualVmxnet3, bus=scsi
Proxmox config: bios=ovmf, machine=q35, scsihw=virtio-scsi-single, disk=scsi, net=virtio
...
All disks at 100% but not 'ready' - using pause-pivot-resume...
...
scsi0: vm-rbd:vm-100-disk-0,size=32G,discard=on,ssd=1
boot: order=scsi0
Phase: completed
On start: WARN: no efidisk configured! Using temporary efivars disk.
Screenshots
n/a
Checklist
- [x] I have searched existing issues to make sure this is not a duplicate
- [x] I am using the latest version of PegaProx
- [x] I've put enough in here that someone can start on it without asking me three questions first
- [x] I understand PegaProx is maintained by volunteers in their free time. Nobody is on call, and writing URGENT doesn't get anyone out of bed 🪄
AI disclosure: code analysis with help from Claude; reproduced in my own lab.
Narrowing it down: live clone (vmkfstools_clone) with firmware "Auto" is fine – efidisk0: …,pre-enrolled-keys=1 is created there, since _run_v2p_migration resolves bios from the detected firmware before that block. So it's the two places listed above (live mirror post-pivot, and _do_offline_qemuimg_copy by code).
_do_offline_qemuimg_copy – same pattern, not reproduced (my offline runs used the SSH dd path, which allocated the efidisk)
Thanks for narrowing it down, that matches what I see on Testing: the clone path gets its firmware from the detection, and the two places you list take the string auto instead. #1275 resolves it the way you suggested, it isn't merged yet.
One thing in there is worth a look if you test it. Once Auto reaches that block, the live mirror would also mount the EFI partition writable on the node while the VM runs on that disk, so while the guest runs that step now only reads. A Windows guest without EFI/BOOT/BOOTX64.EFI gets a warning in the log instead of the file.
I could only check the live mirror by reading the code, the offline copy ran with a fake node. If you get to try it in your lab, that's the part that would tell the most.
Jan-Philipp
1.5.0 is released, and firmware Auto keeps efidisk0 after a live mirror now. Thanks for digging into it, closing.
Nico
Retested on 1.5.0-1: confirmed fixed. Firmware Auto with an EFI source on Live Mirror, Auto (vmkfstools_clone) and Offline copy: efidisk0 with pre-enrolled-keys=1 in every case. After power off/on the Windows guest reports Confirm-SecureBootUEFI True, the Debian guest "SecureBoot enabled".