Skip to content

Conversation

@cgwalters
Copy link
Collaborator

Add support for KubeVirt common-instancetypes to provide standardized VM sizing. Basically it's annoying to have to specify cpus and memory separately always since they're often related, and that's the whole idea of the generic instance type.

We only expose the U1 (Universal) series instancetype definitions from kubevirt/common-instancetypes because we're not a true cloud.

Both bcvk ephemeral run and bcvk libvirt run now accept an --itype flag that overrides --vcpus and --memory settings, making it easier to create consistently-sized VMs across different environments.

For libvirt VMs, the instance type is stored in domain metadata as bootc:instance-type for reference.

Assisted-by: Claude Code (Sonnet 4.5)

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 support for KubeVirt common-instancetypes, which is a great feature for standardizing VM sizing. The implementation looks solid, adding the --itype flag to both bcvk ephemeral run and bcvk libvirt run and correctly overriding CPU/memory settings. The new instancetypes.rs module is well-structured.

My feedback focuses on improving the tests in instancetypes.rs to be more robust and maintainable by using data-driven approaches and strum::EnumIter. I've also suggested an improvement to an integration test to make it more thorough. The changes to the command-line options and documentation are clear and well-executed.

@cgwalters cgwalters force-pushed the bcvk.kubevirt-sizes branch from 21cb048 to c39e70b Compare October 30, 2025 21:26
@cgwalters cgwalters enabled auto-merge (rebase) October 30, 2025 21:34
Add support for KubeVirt common-instancetypes to provide standardized
VM sizing. Basically it's annoying to have to specify cpus and memory
separately always since they're often *related*, and that's
the whole idea of the generic instance type.

We only expose the U1 (Universal) series instancetype
definitions from kubevirt/common-instancetypes because we're not
a true cloud.

Both `bcvk ephemeral run` and `bcvk libvirt run` now accept an
`--itype` flag that overrides `--vcpus` and `--memory` settings,
making it easier to create consistently-sized VMs across different
environments.

For libvirt VMs, the instance type is stored in domain metadata as
`bootc:instance-type` for reference.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters <[email protected]>
@cgwalters cgwalters force-pushed the bcvk.kubevirt-sizes branch from c39e70b to 970f008 Compare October 31, 2025 14:27
@cgwalters cgwalters merged commit 9f587bf into bootc-dev:main Nov 3, 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