- Make sure you have the kernel and live pxe initrd (different from normal initrd). Put them at $WORKDIR/{kernel,initrd}
- Put your ignition config in $WORKDIR/config.ign
- Put this script at $WORKDIR/boot.ipxe:
#!ipxe
kernel tftp://10.0.2.2/kernel console=ttyS0 \
ignition.firstboot ip=dhcp rd.neednet=1 ignition.platform.id=metal \
ignition.config.url=tftp://10.0.2.2/config.ign
initrd tftp://10.0.2.2/initrd
boot
Run:
qemu-kvm -m 4096 --nographic -netdev user,id=n0,tftp=$(pwd),bootfile=boot.ipxe \
-device e1000,netdev=n0 -device virtio-rng-pci
That's it! I haven't spent a lot of time tweaking this, there may be better options like different net devices to use, but this works and is short.