Skip to content

Conversation

@cgwalters
Copy link
Collaborator

For the same reason we propagate other options.

@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 introduces a significant enhancement by adding support for the --karg command-line option, which enables the specification of custom kernel arguments. This allows for more granular control over kernel behavior during the installation of disk images and the execution of virtual machines. The change includes updates to the core argument parsing logic, comprehensive integration tests to validate the functionality, and thorough documentation across relevant man pages to ensure users can effectively leverage this new capability.

Highlights

  • New Feature: Kernel Argument Support: Introduced the --karg option to allow users to pass custom kernel arguments during disk image installation and virtual machine execution, enhancing system configuration flexibility.
  • Core Logic Implementation: The InstallOptions struct in crates/kit/src/install_options.rs now includes a karg field, and its to_args method correctly serializes these arguments for command-line usage.
  • Integration Test Verification: Updated integration tests in crates/integration-tests/src/tests/libvirt_verb.rs to include and verify the successful propagation of a test kernel argument via SSH into the VM's /proc/cmdline.
  • Documentation Updates: Man pages for bcvk-libvirt-run, bcvk-libvirt-upload, and bcvk-to-disk have been updated to clearly document the new --karg option and its usage.
  • Code Refactoring: Minor cleanup in crates/kit/src/cache_metadata.rs test cases, refactoring InstallOptions initialization to use ..Default::default() for improved readability and conciseness.
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.

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 adds support for a --karg option to propagate kernel arguments to bootc install for to-disk, libvirt-run, and libvirt-upload commands. The implementation adds the karg field to InstallOptions and updates the argument construction and documentation.

The changes look good overall, but I've found a few issues. Most importantly, there appears to be a critical issue in an unmodified file, crates/kit/src/libvirt/run.rs, which prevents the new --karg option from working with the libvirt run command. The kernel arguments are not passed to the disk creation logic because at line 164, &[] is passed for kernel_args instead of &opts.install.karg. Since I cannot comment on unmodified files, I'm highlighting this here.

Additionally, I've left a few comments regarding:

  • Inconsistent argument formatting for the bootc command.
  • Duplicated options in some of the updated man pages.
  • An outdated assertion message in an integration test.

Please see my detailed comments for suggestions on how to fix these.

For the same reason we propagate other options.

Note that we had incorrectly included karg in CommonVmOptions
but that can't work without direct kernel boot.

Signed-off-by: Colin Walters <[email protected]>
@cgwalters cgwalters enabled auto-merge (rebase) October 21, 2025 12:17
@cgwalters cgwalters merged commit b6a0a1f into bootc-dev:main Oct 21, 2025
4 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