Skip to content

Golang-based libvirt CPI for BOSH with Multi-Runtime Support #1227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ZPascal
Copy link
Contributor

@ZPascal ZPascal commented Jun 30, 2025

Description

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.

Involved Working Groups:

@cloudfoundry/toc
@cloudfoundry/wg-foundational-infrastructure-vm-deployment-lifecycle-bosh-approvers
@cloudfoundry/wg-foundational-infrastructure-vm-deployment-lifecycle-bosh-reviewers

@beyhan beyhan requested review from a team, rkoster, beyhan, stephanme, ameowlia and ChrisMcGowan and removed request for a team June 30, 2025 07:13
@beyhan beyhan added toc rfc CFF community RFC labels Jun 30, 2025
@ZPascal ZPascal force-pushed the bosh-libvirt-cpi branch from f84a1d5 to 4766fc2 Compare June 30, 2025 07:18
Copy link
Member

@maxmoehl maxmoehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for writing this up!

The existing VirtualBox CPI:
- Is minimally maintained and tied to a single backend (VBox).
- Has limited extensibility and runtime support.
- Is written in Ruby, with a legacy codebase that is harder to modernize.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3. Replacing the **VirtualBox CPI** as the first deliverable and reference implementation.
4. Maintaining compatibility with the standard BOSH CPI contract interfaces (e.g., `create_vm`, `delete_vm`, `attach_disk`, etc.).
5. Enabling backend configuration via BOSH runtime configs, selectable per environment.
6. Publishing the CPI as an open-source component under the Cloud Foundry or BOSH community GitHub organization.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
6. Publishing the CPI as an open-source component under the Cloud Foundry or BOSH community GitHub organization.
6. Publishing the CPI as an open-source component under the Cloud Foundry community GitHub organization.

I think BOSH lives entirely in the CF org?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the CPIs are basically all bosh- prefixed in the Cloud Foundry org such as https://github.com/cloudfoundry/bosh-google-cpi-release

@maxmoehl
Copy link
Member

I have some background written down here which might be of interest to give some context.

Copy link
Contributor

@rkoster rkoster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which stemcell will be used? Or will a new stemcell need to be created?

### Overview

1. **Developing a new Golang-based CPI** using libvirt-go to interface with local hypervisors or containers via libvirt.
2. Supporting multiple backends (initially: VirtualBox, QEMU/KVM, containerd).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not find any references to containerd, there is however support for LXC: https://libvirt.org/drvlxc.html

@rkoster rkoster moved this from Inbox to In Progress in CF Community Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfc CFF community RFC toc
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

5 participants