Add and build a custom iPXE ROM

nerux

Member
Aug 6, 2020
2
1
8
Hello,

kvm could start a VM with a specific ROM.
Could you add an option in Hardware section / network card to specify a ROM file ?


Proxmox VE 6.2.10 : pve-manager/6.2-10/a20769ed (running kernel: 5.4.44-2-pve)
QEMU emulator version 5.0.0 (pve-qemu-kvm_5.0.0)

Bash:
# compile ROM for realtek 8139 (It could be bin/virtio-net.rom, ...)
$ git clone https://git.ipxe.org/ipxe.git
$ cd ipxe
$ cd src/
$ sed -i 's/#undef[[:space:]]*\(DOWNLOAD_PROTO_HTTPS\)/#define \1/' config/general.h

$ make bin/rtl8139.rom EMBED=script.ipxe TRUST=$CATRUST

$ mv bin/rtl8139.rom /usr/share/kvm/pxe-rtl8139.rom

First gather the command launhed by PVE :
qm showcmd 113 --pretty > /tmp/kvm113.launch

Then edit the file and add to the network card ,romfile=pxe-rtl8139.rom
Diff:
+  -device 'rtl8139,mac=3E:18:7F:AA:AA:AA,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=100,romfile=pxe-rtl8139.rom' \
-  -device 'rtl8139,mac=3E:18:7F:AA:AA:AA,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=100' \

Finally run it :
. /tmp/kvm113.launch

As we can see on the screenshot the iPXE's version And HTTPS feature enabled.

I think the problem is in below file arround $use_old_bios_files variable.
vim +1550 /usr/share/perl5/PVE/QemuServer.pm

Thanks
 

Attachments

  • boot_rom_2.png
    boot_rom_2.png
    92 KB · Views: 47
  • boot_rom_3.png
    boot_rom_3.png
    63.4 KB · Views: 45
  • Like
Reactions: wolverine
This sounds like a useful idea, you can open a feature request on our bugtracker so we can further discuss it.
 
  • Like
Reactions: wolverine

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!