Skip to content

Run mkosi.images subimage using nspawn or qemu #3150

Answered by DaanDeMeyer
slarew asked this question in Q&A
Discussion options

You must be logged in to vote

I figured out that I can do this by reading the mkosi code, specifically qemu.py and backing into the solution. It feels like I'm taking advantage of undefined behavior (to borrow the term) for this solution. Is this a fragile approach that is prone to breaking?

Yes we can't guarantee this will keep working. Unfortunately what you're asking for is not supported, mkosi will only boot the top level image, mkosi.images is intended for subimages intended for inclusion or use with the top level image that are not standalone and cannot be booted.

If you want to build multiple images that can all be booted, we recommend having two separate projects and using mkosi -C to boot a specific one. In…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@slarew
Comment options

@DaanDeMeyer
Comment options

Answer selected by slarew
@slarew
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants