Skip to content

Commit 4766fc2

Browse files
committed
feat: Add the BOSH libvirt cpi RFC
1 parent fa10c15 commit 4766fc2

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

toc/rfc/rfc-draft-bosh-libvirt-cpi.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Meta
2+
[meta]: #meta
3+
- Name: Golang-based libvirt CPI for BOSH with Multi-Runtime Support
4+
- Start Date: 2025-06-30
5+
- Author(s): ZPascal
6+
- Status: Draft
7+
- RFC Pull Request: [community#1227](https://github.com/cloudfoundry/community/pull/1227)
8+
9+
## Summary
10+
11+
This proposal introduces a new **Cloud Provider Interface (CPI)** for **BOSH**, implemented in **Go** and based on **libvirt**. It is intended as a modern, maintainable, and extensible alternative to the current **VirtualBox CPI**, supporting multiple virtualization backends, including **VirtualBox**, **QEMU/KVM**, and **container runtimes (e.g., containerd)**. This libvirt-based CPI will serve as a **centralized and runtime-agnostic integration layer** for local or development BOSH deployments, with the initial milestone being to **replace the existing VBox CPI**.
12+
13+
## Problem
14+
15+
The existing VirtualBox CPI:
16+
- Is minimally maintained and tied to a single backend (VBox).
17+
- Has limited extensibility and runtime support.
18+
- Is written in Ruby, with a legacy codebase that is harder to modernize.
19+
20+
Meanwhile, [libvirt](https://libvirt.org/) offers:
21+
- A standard API for interacting with various virtualization technologies.
22+
- Broad backend support, including **QEMU/KVM**, **VirtualBox**, **LXC**, and **containerd** via libvirt plugins.
23+
- Better resource isolation and VM/network emulation capabilities.
24+
- Go client libraries (e.g., [libvirt/libvirt-go](https://gitlab.com/libvirt/libvirt-go)) well-aligned with modern infrastructure tools.
25+
26+
Benefits for the community:
27+
- **Unified, reusable codebase** for local CPI development.
28+
- **Cost reduction** by avoiding duplicated maintenance of multiple special-purpose CPIs.
29+
- **Improved security and performance** through direct integration with native virtualization layers (e.g., KVM).
30+
- **Better testability** and maintainability by adopting Go instead of Ruby.
31+
32+
## Proposal
33+
34+
### Overview
35+
36+
1. **Developing a new Golang-based CPI** using libvirt-go to interface with local hypervisors or containers via libvirt.
37+
2. Supporting multiple backends (initially: VirtualBox, QEMU/KVM, containerd).
38+
3. Replacing the **VirtualBox CPI** as the first deliverable and reference implementation.
39+
4. Maintaining compatibility with the standard BOSH CPI contract interfaces (e.g., `create_vm`, `delete_vm`, `attach_disk`, etc.).
40+
5. Enabling backend configuration via BOSH runtime configs, selectable per environment.
41+
6. Publishing the CPI as an open-source component under the Cloud Foundry or BOSH community GitHub organization.

0 commit comments

Comments
 (0)