fix: install a default guest kernel in setup, stop the runtime for the updater - #31
Merged
Merged
Conversation
…e updater
Two gaps a full teardown-and-reinstall cycle exposed.
apple/container cannot boot any VM until a default guest kernel is set,
and a fresh install has none — nor does one whose user data was deleted,
which `cleanup --all -d` does by design (it passes -d to apple/container's
uninstaller, wiping its kernels directory). Every sandbox create then
failed at image unpack with "default kernel not configured for
architecture arm64", with nothing in setup's output hinting at the cause.
setup now installs the recommended kernel when no default is configured,
skips the step when one is, and only warns (with the retry command) if
the download fails, so setup still repairs the rest of the wiring.
`update --all` ran apple/container's updater while the runtime was up,
which it refuses ("`container` is still running"), so that step always
failed. Stop the runtime first, as the uninstall path already does, and
restart it afterwards so --no-setup does not leave it down.
Covers both kernel branches with tests and documents the symptom in the
README troubleshooting table.
Signed-off-by: Vyncint Ng <vyncint@users.noreply.github.com>
vyncint
added a commit
that referenced
this pull request
Aug 2, 2026
setup installs a default guest kernel; update --all stops the runtime before apple/container's updater (#31). Signed-off-by: Vyncint Ng <vyncint@users.noreply.github.com> Co-authored-by: Vyncint Ng <vyncint@users.noreply.github.com>
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.
Two gaps a full teardown-and-reinstall cycle exposed on a real machine.
1.
setupleaves apple/container without a guest kernelapple/container cannot boot any VM until a default guest kernel is configured. A fresh install has none — and neither does one whose user data was deleted, which
cleanup --all -ddoes by design (it passes-dthrough to apple/container's uninstaller, wiping itskernels/directory). So the teardown → reinstall path this repo now encourages lands in a state where every sandbox create fails:…with nothing in
setup's output hinting at the cause.setupclaims to wire the whole stack, so it should cover this prerequisite.Fix:
setupchecks for~/Library/Application Support/com.apple.container/kernels/default.kernel-<arch>and, when absent, runscontainer system kernel set --recommended(terminal-attached, so the ~600 MB download shows progress).Deliberately non-fatal:
setupis the documented repair command, so a transient download failure must not stop it from fixing the rest of the wiring. It warns loudly (SANDBOXES WILL NOT BOOT until one is set) with the retry command and the manual--tarfallback. Detection is conservative — it only acts when no default kernel exists at all, so a machine that already has one is untouched.2.
update --allalways failed on apple/containerThe updater refuses to run while the runtime is up, and
updatePrerequisitesnever stopped it:Fix: stop the runtime first (as the uninstall path already did), then restart it afterwards so
--no-setupdoesn't leave it down.Verification
go test -race ./...,golangci-lint(0 issues),make secall clean.cleanup --all -d→ freshinstall.sh→ sandbox create failed with the kernel error (confirmingkernels/was empty); installing the kernel madecreatereach Ready andexec uname -areturnLinux … 6.18.15 aarch64. With the fix built and installed,setupcorrectly skipped the kernel step on the now-configured machine and completed normally.