Skip to content

Instantly share code, notes, and snippets.

@ajeddeloh
Last active July 26, 2020 00:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajeddeloh/15470b6e9b042bb89b00d88627c6216e to your computer and use it in GitHub Desktop.
Save ajeddeloh/15470b6e9b042bb89b00d88627c6216e to your computer and use it in GitHub Desktop.
  1. Make sure you have the kernel and live pxe initrd (different from normal initrd). Put them at $WORKDIR/{kernel,initrd}
  2. Put your ignition config in $WORKDIR/config.ign
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment