Skip to content

libvirt: add --bind-storage-ro support for bootc upgrades#20

Merged
cgwalters merged 1 commit intobootc-dev:mainfrom
cgwalters:libvirt-bind-storage-ro
Sep 25, 2025
Merged

libvirt: add --bind-storage-ro support for bootc upgrades#20
cgwalters merged 1 commit intobootc-dev:mainfrom
cgwalters:libvirt-bind-storage-ro

Conversation

@cgwalters
Copy link
Collaborator

Implement --bind-storage-ro flag for bcvk libvirt run to enable bootc upgrade workflows from persistent VMs by mounting host container storage read-only.

Assisted-by: Claude Code

@gemini-code-assist
Copy link

Summary of Changes

Hello @cgwalters, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the bcvk libvirt run command by introducing a --bind-storage-ro flag. This flag enables the creation of virtual machines with read-only access to the host's container storage via virtiofs, specifically addressing the need for streamlined bootc upgrade processes within persistent VM environments. The changes include modifications to the libvirt domain builder, command-line option parsing, and comprehensive integration tests, along with updated documentation.

Highlights

  • New --bind-storage-ro flag: Introduces a new command-line option for bcvk libvirt run to mount host container storage read-only into a VM.
  • bootc upgrade support: Designed to facilitate bootc upgrade workflows by providing persistent VMs with direct access to host container images.
  • Virtiofs integration: Implements virtiofs for sharing the host's container storage with the guest VM, including necessary libvirt XML configuration.
  • Comprehensive testing: Adds an end-to-end integration test to validate the --bind-storage-ro functionality, covering domain creation, XML verification, and in-VM mounting.
  • Documentation updates: Updates user documentation and man pages with details and examples for the new --bind-storage-ro flag.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@cgwalters cgwalters enabled auto-merge (squash) September 24, 2025 14:22
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a --bind-storage-ro flag to bcvk libvirt run, enabling bootc upgrade workflows by mounting the host's container storage read-only inside the VM. The implementation adds the necessary libvirt domain configuration for a virtiofs filesystem, along with a comprehensive integration test and documentation updates. My review focuses on ensuring the read-only constraint is correctly enforced, improving test robustness, and aligning the documentation with the implementation. I've found a critical issue where the read-only flag is not being correctly translated into the libvirt XML, and have provided suggestions to fix this and enhance the corresponding test.

@cgwalters cgwalters force-pushed the libvirt-bind-storage-ro branch 3 times, most recently from 811481e to d5d3dfd Compare September 25, 2025 15:04
Implement --bind-storage-ro flag for `bcvk libvirt run` to enable
bootc upgrade workflows from persistent VMs by mounting host container
storage read-only.

Assisted-by: Claude Code
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters force-pushed the libvirt-bind-storage-ro branch from d5d3dfd to dde7b2b Compare September 25, 2025 15:44
Copy link
Collaborator

@jeckersb jeckersb left a comment

Choose a reason for hiding this comment

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

LGTM, we went over this live earlier

@cgwalters cgwalters merged commit e1b2a28 into bootc-dev:main Sep 25, 2025
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants