Thanks to dnsmasq DHCP Foreman plugin, development setup for provisioning can be little bit easier. After git checkout of Foreman core, Smart Proxy and Smart Proxy DHCP Dnsmasq plugin, perform creation of initial directory structure:

# DEVELOPER=lzap
# mkdir /var/lib/libvirt/dnsmasq/foreman-default
# chown $DEVELOPER:dnsmasq /var/lib/libvirt/dnsmasq/foreman-default
# touch /var/lib/dnsmasq/foreman-default.leases
# chown $DEVELOPER:dnsmasq /var/lib/dnsmasq/foreman-default.leases
# mkdir /var/lib/dnsmasq/tftp
# chown $DEVELOPER:dnsmasq /var/lib/dnsmasq/tftp/
# setfacl -m u:$DEVELOPER:r-- /var/lib/libvirt/dnsmasq/default.conf

Copy PXELinux files, this will work also for Grub2 or iPXE:

# cp /usr/share/syslinux/*.{bin,c32,0} /var/lib/dnsmasq/tftp

Finally, change libvirt “default” network configuration in the following way. The difference between the default configuration are the following elements or attributes:

  • tftp

  • bootp

  • dnsmasq:options

  • xmlns:dnsmasq

Restart libvirt network named “default” and you are good to go. Note in this setup I haven’t configured DNS, therefore unattended_url must be set to something like http://192.168.122.1:3000.