Enable PXE booting on a LXD managed bridge network e.g. lxdbr0

This is just an informational post in case anyone might find it useful.
Should you need to enable PXE booting on an internal/managed LXD network such as the default lxdbr0 you can do so as follows (EFI only):

lxc network edit <network name e.g. lxdbr0>

config:
  ipv4.address: 10.248.99.1/24
  ipv4.nat: "true"
  raw.dnsmasq: |
    dhcp-match=set:efi-x86_64,option:client-arch,7
    dhcp-match=set:efi-x86_64,option:client-arch,9
    dhcp-boot=netboot.xyz.efi,,10.248.99.165 #adjust these values to match your needs
...

OR

echo -e "dhcp-match=set:efi-x86_64,option:client-arch,7\ndhcp-match=set:efi-x86_64,option:client-arch,9\ndhcp-boot=netboot.xyz.efi,,10.248.99.165" | lxc network set lxdbr0 raw.dnsmasq -  
3 Likes