FreeBSD The Power to Serve

OpenStack on FreeBSD

Contact: Chih-Hsin Chang <starbops@hey.com>
Contact: Li-Wen Hsu <lwhsu@FreeBSD.org>

OpenStack, an open-source cloud operating system, has been a valuable resource for deploying various resource types on cloud platforms. However, the challenge has been running OpenStack’s control plane on FreeBSD hosts. Our project’s mission is to enable FreeBSD to function seamlessly as an OpenStack host.

Throughout this quarter, we focused on the last bit of the entire proof of concept (POC), the VM console integration. The goal is to let users get serial consoles via the OpenStack client to access the VM instances running on the FreeBSD-based OpenStack cluster. This is also important because right now we do not have a port for the managed DHCP service in Neutron. Users need to manually configure the correct IP addresses for the VM instances to have network connectivity. However, bhyve(8) does not natively expose serial consoles, so we need to instead export the nmdm(4) device over the network. This is done by a custom proxy called socat-manager, and yes, we leverage socat(1) to listen on specific ports allocated by OpenStack nova-compute to be integrated into their workflow. With the aid of another critical part, the custom Libvirt hook for bhyve, we can connect the two endpoints and make the consoles accessible to the users. During development of the hook script, we found that the hook interface provided by Libvirt specifically for bhyve was not well implemented. Fortunately, the Libvirt developer fixed the issue promptly, and we plan to refine our hook script when the fix is released in the future.

We also addressed the nested bhyve issue (running bhyve VMs on top of Linux KVM) in our development environment mentioned in the last quarterly report. It is caused by the APIC emulation of the two VT-x features: VID and PostIntr.

Our host’s CPUs have these two features so we need to disable them at the L1 guest, which acts as a bhyve host, in /boot/loader.conf to make L2 guests not hanging. It is crucial for us to be able to work on the project in a fully virtualized environment due to the lack of physical resources. This could be equally important for people interested in the project, lowering the bar for them to try out or validate the entire POC on their environment without too demanding setup requirements.

Looking ahead to Q4, our focus is wrapping up the POC with revised documentation and porting to FreeBSD 14.0-RELEASE. Dependencies that lack the corresponding FreeBSD packages will be ported one by one. We also aim to rebase our work with OpenStack 2023.1 Antelope. We invite those interested to explore our documentation and contribute to this project’s success.

Sponsor: The FreeBSD Foundation


Last modified on: November 1, 2023 by Lorenzo Salvadore