Skip to content

qemu: Various enhancements#217

Open
cgwalters wants to merge 2 commits intobootc-dev:mainfrom
cgwalters:iso-boot-mode
Open

qemu: Various enhancements#217
cgwalters wants to merge 2 commits intobootc-dev:mainfrom
cgwalters:iso-boot-mode

Conversation

@cgwalters
Copy link
Collaborator

In bootc-dev/bootc#2018 we want to
run an Anaconda install - but reusing host content mounted via
virtiofs, and we keep running into this same problem of while
we can do it with libvirt/virt-install, there's some nontrivial
glue needed there, and there's *so many* advantages to directly
running qemu (especially lifecycle binding, low level control)
and we already are carrying qemu code here anyways.

So extend our qemu logic to support ISO images, along with:

- serial_log field for directing serial console to a file
- no_reboot flag to prevent automatic reboot

Assisted-by: OpenCode (claude-opus-4-5-20250114)
Signed-off-by: Colin Walters <walters@verbum.org>
Per previous commit we're still carrying direct qemu code, and we
really do want to use the modern default machine types. This came
up as part of deduplicating our qemu logic with that generated
for custom bootc testing.

This mirrors the machine types used by bcvk's libvirt integration
(see crates/kit/src/arch.rs) for consistency between direct QEMU
and libvirt code paths.

Assisted-by: OpenCode (claude-opus-4-5@20251101)
Signed-off-by: Colin Walters <walters@verbum.org>
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 several useful enhancements to the QEMU wrapper, including support for ISO booting, configurable machine types, serial log output, and a no-reboot option. The changes are well-implemented, with corresponding updates to configuration, validation, and the VM spawning logic. A new test case for the ISO boot configuration is also included. I have one suggestion to improve the validation logic for better consistency and robustness.

@cgwalters cgwalters enabled auto-merge (rebase) March 3, 2026 13:55
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.

1 participant