π₯ A revolutionary git-ops-based, multi-tenant hypervisor platform built on systemd technologies for secure, isolated, and declaratively managed virtualization environments.
BBOS is a fully customizable immutable distribution implementing the concepts described in Fitting Everything Together.
The crucial difference that makes BBOS unique compared to other immutable distributions is that users build the BBOS image themselves and sign it with their own keys instead of installing vendor signed images. This allows configuring the image to your liking by having full control over which distribution is used as the base and which packages are installed into the image.
BitBuilder Hypervisor is a next-generation hypervisor system that leverages the full power of systemd's virtualization and containerization capabilities to provide secure, isolated multi-tenant environments. Each tenant's configuration is version-controlled in Git repositories, enabling true infrastructure-as-code workflows with automatic provisioning and updates at boot time.
| Feature | Description | Benefits |
|---|---|---|
| π Git-Ops Native | All configurations stored in Git repositories, pulled at boot time | Version control, atomic deployments, rollback capability |
| π Multi-Tenant Isolation | Complete separation between tenants using systemd's security features | Zero trust architecture, cryptographic boundaries |
| π‘οΈ Immutable Host OS | Read-only host system with all changes applied through git-controlled overlays | Eliminates configuration drift, enhanced security |
| π― Declarative Configuration | Everything defined as code, no manual configuration required | Infrastructure as Code, automated provisioning |
| π Zero-Trust Architecture | Each tenant runs in completely isolated environments | Hardware-backed security, namespace isolation |
| β‘ Dynamic Provisioning | Automatic tenant setup and teardown based on git repository state | Scalable operations, automated lifecycle management |
| Component | Purpose | Features |
|---|---|---|
| π systemd-boot | UEFI boot manager for secure boot chain | Secure boot, UKI support, boot management |
| β¬οΈ systemd-import-generator | Automatic EFI image download and boot management | DDI support, automatic updates, verification |
| π₯οΈ systemd-vmspawn | Lightweight VM spawning for tenant isolation | Hardware virtualization, resource isolation |
| π¦ systemd-nspawn | Container spawning for application isolation | Namespace isolation, security boundaries |
| π systemd-networkd | Network configuration and isolation | Software-defined networking, tenant isolation |
| π systemd-homed | User home directory management with encryption | Encrypted homes, hardware-backed auth |
| π Portable Services | Self-contained service images | Application portability, dependency isolation |
| π sysext/confext | System and configuration extensions via overlayfs | Layered filesystems, immutable updates |
| π Varlink | IPC protocol for service communication | Type-safe IPC, service discovery |
BitBuilder Hypervisor implements and adheres to the Linux Userspace API Specifications:
| Specification | Purpose | Implementation |
|---|---|---|
| π Configuration Files Specification | Standardized locations for configuration management | /etc, /usr/lib, /run hierarchy |
| π½ Discoverable Partitions Specification (DPS) | Auto-discovery of partition semantics | GPT partition type GUIDs |
| π Discoverable Disk Image (DDI) | Self-describing system images | Unified disk images with metadata |
| π§ Extension Image | Layered extensions to base images | Overlay filesystem extensions |
| βββ sysext | System Extension Images overlaid on /usr/ and /opt/ |
Runtime system extensions |
| βββ confext | Configuration Extension Images overlaid on /etc/ |
Runtime configuration extensions |
| π Unified Kernel Image (UKI) | Combined kernel, initrd, and boot configuration | Single-file bootable images |
| π₯Ύ Boot Loader Specification (BLS) | Standardized boot configuration | systemd-boot integration |
| Component | Description | Technology |
|---|---|---|
| π‘οΈ Immutable Host | The host OS boots from an immutable image downloaded via systemd-import-generator | DDI images, systemd-import |
| π Tenant Isolation | Each tenant runs in isolated systemd-vmspawn/nspawn instances | Hardware virtualization, namespaces |
| π Git-Based Configuration | All tenant configurations pulled from dedicated Git repositories | Git-ops, declarative config |
| ποΈ Dynamic Mount Generation | Custom systemd generators create tenant-specific mount points | systemd generators, overlay mounts |
| π§ Layered Extensions | System capabilities extended through sysext/confext layers | Extension images, overlayfs |
Each tenant in the BitBuilder Hypervisor follows a complete lifecycle management approach:
graph LR
A[π Git Repository] --> B[π Discovery]
B --> C[β‘ Provisioning]
C --> D[π₯οΈ VM/Container]
D --> E[π Updates]
E --> A
style A fill:#e3f2fd
style B fill:#f3e5f5
style C fill:#e8f5e8
style D fill:#fff3e0
style E fill:#fce4ec
| Step | Process | Details |
|---|---|---|
| 1οΈβ£ | Dedicated Git Repository | Each tenant has its own configuration repository |
| 2οΈβ£ | Automatic Provisioning | Boot-time provisioning via setup-tenant@<tenantname>.service |
| 3οΈβ£ | Isolated Execution | Runs in systemd-vmspawn or systemd-nspawn instances |
| 4οΈβ£ | Custom Extensions | Can have tenant-specific sysext/confext layers |
| 5οΈβ£ | Network Isolation | Complete network isolation via systemd-networkd |
| 6οΈβ£ | Automatic Updates | Updates automatically when Git repository changes |
sequenceDiagram
participant UEFI as π UEFI Boot
participant Boot as π systemd-boot
participant Import as β¬οΈ systemd-import-gen
participant Host as π₯οΈ Host OS
participant Git as π Git Sync
participant Discovery as π Tenant Discovery
participant Provision as β‘ Tenant Provisioning
UEFI->>Boot: Load boot configuration
Boot->>Import: Download and verify EFI image
Import->>Host: Start immutable host OS
Host->>Git: Pull system configurations
Git->>Discovery: Scan for tenant configs
Discovery->>Provision: For each tenant:
Note over Provision: β’ Clone/pull tenant repo<br/>β’ Mount tenant directories<br/>β’ Apply sysext/confext layers<br/>β’ Start VM/container<br/>β’ Execute provisioning units
| Phase | Component | Action | Result |
|---|---|---|---|
| 1οΈβ£ | π UEFI Boot | systemd-boot loads the boot configuration | Secure boot validation |
| 2οΈβ£ | β¬οΈ Image Import | systemd-import-generator downloads and verifies the host EFI image | DDI image verification |
| 3οΈβ£ | π₯οΈ Host Boot | Immutable host OS starts with minimal services | Base system ready |
| 4οΈβ£ | π Git Sync | System-level configurations pulled from Git repositories | Configuration sync |
| 5οΈβ£ | π Tenant Discovery | Scan for tenant configurations in Git | Tenant enumeration |
| 6οΈβ£ | β‘ Tenant Provisioning | For each discovered tenant: provision resources | Multi-tenant setup |
/
βββ /boot/ # Boot partition (read-only)
β βββ efi/ # EFI System Partition
βββ /etc/ # Host configuration (overlayfs from confext)
β βββ systemd/
β β βββ system/ # System units
β β β βββ [email protected] # Tenant instantiation template
β β β βββ [email protected] # Infrastructure manager template
β β β βββ [email protected] # Network manager template
β β βββ network/ # Network configuration templates
β β βββ system-generators/ # Custom systemd generators
β β βββ tenant-generator # Discovers and instantiates tenants
β β βββ mount-generator # Generates mount units for tenants
β βββ voa/ # Verification of OS Artifacts
β βββ bitbuilder/image/default/openpgp/
βββ /usr/ # Vendor OS (read-only, overlayfs from sysext)
β βββ lib/
β β βββ extensions/ # System-wide extension images
β β β βββ base-tools.sysext.raw
β β β βββ monitoring.sysext.raw
β β β βββ security.confext.raw
β β βββ systemd/
β β β βββ system/ # Vendor systemd units
β β β βββ network/ # Vendor network templates
β β βββ bitbuilder/
β β βββ templates/ # Tenant template repositories
β β β βββ tenant-infra/
β β β βββ tenant-machine/
β β β βββ tenant-container/
β β β βββ tenant-homed/
β β βββ generators/ # BitBuilder systemd generators
β βββ share/
β βββ voa/ # Vendor verification keys
βββ /var/ # Persistent variable data
β βββ lib/
β β βββ machines/ # systemd-nspawn containers
β β βββ tenants/ # Tenant persistent storage
β β β βββ <tenant-id>/
β β β βββ infra/ # Infrastructure VM
β β β β βββ rootfs/ # Infrastructure manager root
β β β β βββ config.git/ # Cloned infra config repo
β β β βββ machines/ # Tenant VMs (systemd-vmspawn)
β β β β βββ <machine-id>/
β β β β βββ disk.raw # VM disk image
β β β β βββ config/ # Machine-specific config
β β β βββ containers/ # Tenant containers (systemd-nspawn)
β β β β βββ <container-id>/
β β β β βββ rootfs/ # Container root filesystem
β β β βββ extensions/ # Tenant-specific extensions
β β β β βββ sysext/ # System extensions
β β β β βββ confext/ # Configuration extensions
β β β βββ network/ # Network namespace configs
β β β βββ homed/ # User home directories
β β βββ extensions.mutable/ # Mutable overlay configuration
β β βββ etc/ # -> /var/lib/tenants/<id>/overlay/etc
β β βββ usr/ # -> /var/lib/tenants/<id>/overlay/usr
β βββ cache/
β βββ tenants/ # Cached tenant images
βββ /run/ # Runtime data (tmpfs)
βββ systemd/
β βββ generator/ # Generated units at boot
βββ tenants/ # Runtime tenant data| Security Layer | Technology | Implementation | Benefit |
|---|---|---|---|
| ποΈ Immutable Infrastructure | DDI, overlayfs | Host OS cannot be modified at runtime | Eliminates configuration drift |
| π Git-Only Changes | Git-ops workflow | All modifications through Git commits | Audit trail, rollback capability |
| π Tenant Isolation | systemd security | Complete separation using multiple boundaries | Defense in depth |
| π Encrypted Storage | systemd-homed, LUKS | Optional encryption for tenant data | Data protection at rest |
| π Secure Boot | UEFI, TPM | Full secure boot chain support | Boot integrity verification |
graph TB
subgraph "π Tenant A"
VM1[π₯οΈ VM Instance]
NS1[π¦ Container]
end
subgraph "π Tenant B"
VM2[π₯οΈ VM Instance]
NS2[π¦ Container]
end
subgraph "π‘οΈ Security Boundaries"
PID[π PID Namespaces]
NET[π Network Isolation]
MOUNT[πΎ Mount Namespaces]
USER[π€ User Namespaces]
CGROUP[βοΈ Resource Limits]
CAP[π§ Capabilities]
MAC[π‘οΈ SELinux/AppArmor]
end
VM1 --- PID
VM2 --- PID
NS1 --- NET
NS2 --- NET
VM1 --- MOUNT
VM2 --- USER
NS1 --- CGROUP
NS2 --- CAP
VM1 --- MAC
bitbuilder-system/
βββ .gitops/
β βββ config.yaml # Git-ops configuration
βββ generators/ # Custom systemd generators
β βββ tenant-generator # Tenant discovery and instantiation
β βββ mount-generator # Extension mount generation
βββ units/ # System service units
β βββ [email protected] # Tenant instantiation template
β βββ [email protected] # Infrastructure manager template
β βββ [email protected] # Network setup template
βββ network/ # Network configuration templates
β βββ 10-tenant-bridge.netdev
β βββ 10-tenant-bridge.network
β βββ 20-wg-tenant.netdev
β βββ 20-wg-tenant.network
β βββ 30-vxlan-tenant.netdev
β βββ 30-vxlan-tenant.network
βββ extensions/ # System-wide extensions
β βββ base-tools.sysext.raw
β βββ monitoring.sysext.raw
β βββ security.confext.raw
βββ tenants/ # Tenant registry
βββ registry.json # Active tenants listtenant-<name>/
βββ metadata.json # Tenant metadata and requirements
βββ infrastructure/ # Infrastructure manager config
β βββ config.yaml # Infra manager configuration
β βββ resource-limits.yaml # Resource quotas
βββ network/ # Network configuration
β βββ topology.yaml # Network topology definition
β βββ wireguard/ # VPN configurations
β βββ firewall/ # Firewall rules
βββ machines/ # VM definitions
β βββ <machine-name>/
β βββ config.yaml # VM configuration
β βββ cloud-init/ # Cloud-init data
βββ containers/ # Container definitions
β βββ <container-name>/
β βββ config.yaml # Container configuration
β βββ rootfs-overlay/ # Filesystem overlays
βββ extensions/ # Tenant-specific extensions
β βββ sysext/ # System extensions
β β βββ *.sysext.raw
β βββ confext/ # Configuration extensions
β βββ *.confext.raw
βββ services/ # Portable service definitions
β βββ *.portable.raw
βββ users/ # User definitions
β βββ <username>/
β βββ homed-config.json # systemd-homed configuration
βββ scripts/
βββ pre-provision.sh # Pre-provisioning script
βββ post-provision.sh # Post-provisioning script
βββ health-check.sh # Health monitoring scriptBitBuilder provides standard templates for creating new tenants and resources:
| Template | Purpose | Technology | Use Case |
|---|---|---|---|
ποΈ tenant-infra-template |
Infrastructure manager VM template | systemd-vmspawn | Tenant orchestration |
π₯οΈ tenant-machine-template |
VM instance template | systemd-vmspawn | Application VMs |
π¦ tenant-container-template |
Container template | systemd-nspawn | Containerized apps |
π tenant-homed-template |
User home directory template | systemd-homed | User environments |
π§ sysext-template |
System extension template | Extension images | System augmentation |
βοΈ confext-template |
Configuration extension template | Extension images | Config management |
| Advantage | Description | Impact |
|---|---|---|
| π Version Control | All infrastructure changes tracked in Git | Complete change history, diff capabilities |
| π Rollback Capability | Easy reversion to previous configurations | Zero-downtime rollbacks, safety net |
| π Audit Trail | Complete history of all changes | Compliance, security, accountability |
| π― Declarative Management | Define desired state, not procedures | Reduced complexity, predictable outcomes |
| π Scalability | Add/remove tenants by updating Git repositories | Horizontal scaling, resource optimization |
| β‘ Consistency | Identical deployments from the same Git commits | Reproducible infrastructure, dev/prod parity |
| π§ͺ Testing | Test configurations in staging before production | Risk reduction, validation workflows |
| Use Case | Industry | Benefits | Technology Stack |
|---|---|---|---|
| π’ Multi-Tenant Hosting | Cloud Providers | Secure isolation for multiple customers | systemd-vmspawn, networking |
| π¨βπ» Development Environments | Software Development | Reproducible developer workspaces | systemd-nspawn, git-ops |
| π Edge Computing | IoT, CDN | Lightweight virtualization for edge deployments | Minimal footprint, secure boot |
| π CI/CD Infrastructure | DevOps | Dynamic test environments | Automated provisioning, git integration |
| π Application Isolation | Security | Run untrusted workloads safely | Namespace isolation, capabilities |
| π Compliance Environments | Finance, Healthcare | Auditable, immutable infrastructure | Immutable OS, audit trails |
| Component | Minimum | Recommended | Purpose |
|---|---|---|---|
| π UEFI Firmware | UEFI 2.0+ | UEFI 2.8+ with Secure Boot | Boot integrity, hardware security |
| βοΈ systemd Version | 258+ | 260+ | All virtualization features enabled |
| π Git Client | 2.30+ | Latest stable | Repository operations, authentication |
| π Network Connectivity | Basic | High-bandwidth | Git repository access, updates |
| πΎ Resources | 8GB RAM, 100GB storage | 32GB RAM, 1TB NVMe SSD | Tenant VMs/containers |
The BBOS image is built using mkosi. You will need to install the current main branch of mkosi to build current BBOS images.
First, configure the variant you'd like to build in mkosi.local.conf. For a
desktop system, you'll want the desktop profile and either the gnome or the
kde profile.
[Distribution]
Distribution=arch
[Config]
Profiles=desktop,kde
To build the image, run mkosi -B -f from the BBOS repository. Currently
arch, fedora and debian are supported distributions. Implementing support for a
new distribution (that's already supported in mkosi) is as simple as writing the
necessary config files to install the required packages for that distribution.
To update the system after installation, you clone the BBOS repository
or your fork of it, make sure mkosi.local.conf is configured to your liking and
run mkosi -B -ff sysupdate -- update --reboot which will update the system using
systemd-sysupdate and then reboot.
Sometimes BBOS adopts systemd features as soon as they get merged into
systemd without waiting for an official release. That's why we recommend
enabling the obs profile to enable the systemd repositories on OBS
(https://software.opensuse.org//download.html?project=system%3Asystemd&package=systemd)
containing systemd packages which are built every day from systemd's git main
branch.
To enable the obs profile, add the following to mkosi.local.conf:
[Config]
Profiles=obs
As an alternative to using the obs profile, you can build systemd from source:
git clone https://github.com/systemd/systemd
cd systemd
mkosi -f sandbox -- meson setup build
mkosi -f sandbox -- meson compile -C build
mkosi -t none -fThen write the following to mkosi.local.conf in the BBOS repository to
use the artifacts from the systemd repository built by mkosi in BBOS:
[Content]
VolatilePackageDirectories=../systemd/build/mkosi.builddir/<distribution>~<release>~<arch>
[Build]
ExtraSearchPaths=../systemd/build
Make sure the distribution and release in mkosi.local.conf are identical in the
systemd checkout and the bbos checkout.
To build a newer systemd, run git pull in the systemd repository followed by
mkosi -f sandbox -- meson compile -C build and mkosi -t none.
BBOS images are signed for Secure Boot with the user's keys. To generate a new key,
run mkosi genkey. The key must be stored safely, it will be required to sign updates.
The key can be stored in a smartcard. Then you have to set the key in mkosi.local.conf:
[Validation]
SecureBootKey=pkcs11:object=Private key 1;type=private
SecureBootKeySource=provider:pkcs11
#SignExpectedPcrKey=pkcs11:object=Private key 1;type=private
#SignExpectedPcrKeySource=provider:pkcs11
VerityKey=pkcs11:object=Private key 1;type=private
VerityKeySource=provider:pkcs11
Before installing BBOS, make sure that Secure Boot is in setup mode on the
target system. The Secure Boot mode can be configured in the UEFI firmware
interface of the target system. If there's an existing Linux installation on the
target system already, run systemctl reboot --firmware-setup to reboot into
the UEFI firmware interface. At the same time, make sure the UEFI firmware
interface is password protected so an attacker cannot just disable Secure Boot
again.
To install BBOS with a USB drive, first build the image on an existing
Linux system as described above. Then, burn it to the USB drive with
mkosi burn /dev/<usb>. Once burned to the USB drive, plug the USB drive into
the system onto which you'd like to install BBOS and boot into the USB
drive via the firmware. Then, boot into the "Installer" UKI profile. When you
end up in the root shell, run
systemd-repart --dry-run=no --empty=force --defer-partitions=swap,root,home /dev/<drive>
to install BBOS to the system's drive. Finally, reboot into the target
drive (not the USB) and the regular profile (not the installer one) to complete
the installation.
systemd doesn't support adding a recovery key to a partition enrolled with a token
only (tpm/fido2). It is possible to use cryptenroll to add a recovery password
to the root partition: cryptsetup luksAddKey --token-type systemd-tpm2 /dev/<id>
Only firmwares that are dependencies of a kernel module are included, but some
modules don't declare their dependencies properly. Dependencies of a module can be
found with modinfo. If you experience missing firmwares, you should report
this to the module maintainer. FirmwareInclude= can be added in mkosi.local.conf
to include the firmware regardless of whether a module depends on it.
After installing BBOS and logging into your systemd-homed managed user, run the following to configure systemd-homed for the best experience:
homectl update \
--auto-resize-mode=off \
--disk-size=max \
--luks-discard=on"Disabling the auto resize mode avoids slow system boot and shutdown. Enabling LUKS discard makes sure the home directory doesn't become inaccessible because systemd-homed is unable to resize the home directory.
If you boot BBOS in a virtual machine using mkosi vm, the root password
is automatically set to bbos and a default user bbos with password
bbos is created as well.
This project is licensed under the GNU Lesser General Public License v2.1 (LGPL-2.1). See the LICENSE file for details.