Unable to boot OVMF VM on Proxmox 6

If you are getting the BdsDxe: failed to load Boot0001 "UEFI QEMU HARDDISK QM00013 error when trying to boot an ISO mage on a VM using OVMF (UEFI), the issue is likely that the ISO image doesn't support Secure Boot (such as TrueNAS for example) but your VM has it enabled.

When you create a VM using OVMF, the option Pre-Enroll keys is checked by default which automatically enables Secure Boot when selected.

In this scenario, there are two options to disable Secure Boot:

(Recommended) Disable Secure Boot in the OVMF menu:
  1. Boot VM
  2. <Esc> to enter OVMF menu.
  3. Device Manager Secure Boot Configuration
  4. Attempt Secure Boot<Spacebar><Enter>F10 (to save)
  5. Exit
  6. Reboot VM.
Or you can re-create the VM's EFI disk:
  1. Shutdown VM.
  2. Click Hardware.
  3. EFI DiskRemove
  4. Then re-add with AddEFI Disk
  5. Select EFI Storage volume.
  6. Uncheck "Pre-Enroll keys".
  7. Click Ok.
  8. Boot VM.