In Progress

cloud-init is the standard way of provisioning servers in the cloud. Unfortunately, cloud-init’s support for operating systems other than Linux is rather poor and the lack of cloud-init support on FreeBSD is a hindrance to cloud providers who want to offer FreeBSD as a Tier I platform. To remedy this, the FreeBSD Foundation has contracted Mina Galić to bring FreeBSD cloud-init support on par with Linux support.  The project deliverables include completing an extraction of certain networking classes, implementing ifconfig(8) and login.conf(5) parsers, implementing IPv6 configuration, creating devd rules for Azure, and writing Handbook documentation about productionizing FreeBSD.


cloud-init was conceived as a Linux project, and support for BSDs has been bolted on. When trying to extend cloud-init to better work with FreeBSD, it was discovered that even support between different Linux distros was poor. From this was born a refactoring project to extract the networking capabilities into cloud-init’s Distro classes. That project was proposed and initially driven by Mina, but it has still not been completed by cloud-init maintainers and contributors. The reason is that for Linux, the current design works well enough. In order to improve networking support for FreeBSD and other BSDs however, this would be the first major step.

Networking Refactor

One of the issues with cloud-init refactoring is that helper functions access /sys on Linux. The equivalent on the BSDs is to parse ifconfig(8), the result however, would be on a much higher level. This would allow for refactoring some low hanging fruit, as well as validating the parser. This work involves implementing an ifconfig(8) parser for BSDs and refactoring is_bond, is_bridge, is_physical, is_up, is_vlan, get_interfaces, get_interface_mac, get_interfaces_by_mac, and interface_has_own_mac. After the network updates, it will be necessary to refactor the EphemeralIPv4Network, EphemeralIPv6Network, and the EphemeralDHCPv4 classes. The final network steps will be to separate the network renderer from bringup/down, implement BSDRenderer.start_services, IPv6 and WiFi configurations for FreeBSD.


Supporting documentation will be written to link various cloudinit phases with rc.conf, rc.local and similar start up phases as well as FreeBSD-specific information covering where and how to auto-install packages, run freebsd-update, and execute post-install steps, etc. FreeBSD Handbook documentation will also be written describing on how to productionize FreeBSD.


The cloud provider specific validation work that will be done includes teaching pycloudlib about other operating systems and their defaults, creating devd rules for Azure, and reviewing existing GCP/Azure/AWS/etc cloud provider configurations for changes.

Future Work

Some ideas for future work include implementing libxo(3) for ifconfig(8) and similar tools and implementing a UCL parser for cloud-init.