Repository navigation
Conversation
A guest reset and a guest power-off both end krunkit with exit code 0, so the caller cannot tell a reboot from a shutdown and start the VM again. libkrun 1.19.8 has krun_set_reset_exit_code for this (libkrun/libkrun#986). --reset-exit-code <code> passes the code on; without the option krunkit doesn't make the call and nothing changes. Signed-off-by: Willie Abrams <willie@pobox.com> Assisted-by: LLM
willie
force-pushed
the
reset-exit-code
branch
from
November 10, 2026 23:29
5ef6770 to
5a80802
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A guest reset and a guest power-off both end krunkit with exit code 0, so the caller cannot tell a reboot from a shutdown and start the VM again.
libkrun 1.19.8 has
krun_set_reset_exit_codefor this (libkrun/libkrun#986).--reset-exit-code <code>passes the code on. Without the option krunkit does not make the call and nothing changes. Linking now needs libkrun 1.19.8 or newer; thelibkrun/kruntap has it.Tested on an M4 Pro against libkrun v1.19.8 with a Fedora 44 guest booted from EFI:
rebootover ssh exits krunkit with 32 when run with--reset-exit-code 32and with 0 without the option;poweroffexits 0 with the option.cargo test,cargo fmt --checkandcargo clippypass.