- QEMU includes bundled option ROMs which are loaded by default unless a device is specifically setup with --romfile="".
- These options roms are bundled as binaries. The source code for the same can be found at http://ipxe.org/
- These options roms are useful for example when you want to PXE boot over a virtio-net device.
Here is an example of booting via Network PXE using the option ROM
qemu-system-x86_64 \
-machine pc,accel=kvm,kernel_irqchip \
-enable-kvm \
-smp sockets=1,cpus=4,cores=2 -cpu host \
-m 1024 \
-netdev user,id=mynet0,hostfwd=tcp::${VMN}0022-:22,hostfwd=tcp::${VMN}2375-:2375 \
-device virtio-net-pci,netdev=mynet0,bootindex=1 \
-device virtio-rng-pci \
-monitor telnet:127.0.0.1:55555,server,nowait \
-debugcon file:debug.log -global isa-debugcon.iobase=0x402 $@
From the boot log you will observer that the PXE boot is initiated over the virtio network device.
Now if you specify romfile=""
-device virtio-net-pci,netdev=mynet0,bootindex=1,romfile="" \
you will notice that the PXE boot over the network device is skipped.
However with OVMF/EDK2 the firmware include PXE support and the option rom is not needed. This can be quickly verified by launching QEMU with OVMF but without the option rom and the PXE boot will work.
qemu-system-x86_64 \
-machine pc,accel=kvm,kernel_irqchip \
-bios ovmf.fd \
-enable-kvm \
-smp sockets=1,cpus=4,cores=2 -cpu host \
-m 1024 \
-netdev user,id=mynet0,hostfwd=tcp::${VMN}0022-:22,hostfwd=tcp::${VMN}2375-:2375 \
-device virtio-net-pci,netdev=mynet0,bootindex=1,romfile="" \
-monitor telnet:127.0.0.1:55555,server,nowait \
-debugcon file:debug.log -global isa-debugcon.iobase=0x402 $@
(C) 2011 Microsoft