Enhancing support for cloud-init, making FreeBSD a Tier I platform to improve its integration and usability in cloud environments.
Contact: Mina Galić <freebsd@igalic.co>
Cloud-init is now the standard for setting up servers in the cloud. Over the past year and a half, FreeBSD has significantly improved its support for cloud-init. Working closely with the cloud-init developers and the FreeBSD Foundation, this year’s focus has been on enhancing FreeBSD to enable the cloud-init team to directly test future changes to FreeBSD code paths.
To achieve this, FreeBSD must run in LXD (and Incus) under the control of lxd-agent (or incus-agent). Recently, there have been several notable improvements. A small testing framework was developed in sh, which is gradually moving to OpenTofu/Terraform. This framework installs and tests the latest versions of cloud-init-devel and cloud-init. To support this, a dedicated public repository was created, containing the latest versions of cloud-init-devel and cloud-init for FreeBSD 13 and 14 on amd64 and aarch64.
Additionally, the Linux vsock testing framework was ported to FreeBSD. A driver skeleton for a VirtIO Socket driver, based on the HyperV Socket driver, was created, leading to numerous improvements in HyperV sockets. These improvements have been partially accepted, with more work still needed.
The latest 24.1 series of cloud-init was tested and released, fixing longstanding bugs such as moving /run/cloud-init to /var/run/cloud-init on BSD and correcting the homedir argument to user_groups. This release also included numerous fixes to the OpenBSD code-paths contributed by the community.
Looking ahead, the work involves several key tasks. Finishing the FreeBSD VirtIO Socket driver and fixing Go’s runtime to support VirtIO on FreeBSD is a priority. Porting lxd-agent’s dependencies and lxd-agent itself to FreeBSD is also crucial. These efforts will be interspersed with further improvements to cloud-init on BSDs and additional tests on different cloud providers.
More Information: Cloud-Init (GitHub)