Repository navigation
Conversation
The kernel sets its host name from the fifth field of ip=, which was always "urunc". Fill it from the OCI spec's hostname instead, so a pod or a named container shows its own name in the guest. Fall back to "urunc" when the name is unset, longer than the kernel's 64 bytes, or holds a ':' or a blank, which would split the argument. Signed-off-by: Anastassios Nanos <ananos@nofire.ai>
This was referenced Nov 29, 2026
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.
Description
The same change as the PR into
main(linked below), forfeat/linux-hvi-v050, the branch hull and the brig bundles pin.The guest kernel takes its host name from the fifth field of
ip=, and urunc writesuruncthere. This patch fills it from the OCI spec'shostname, with the same fallback touruncfor a name that is unset, over 64 bytes, or holds a:or a blank.On this branch
ip=is built inLinuxNet.ipParam(), which now takes the host name. hull builds its macOS container-boot command line throughunikernels.Linuxfrom this branch too, so once hull setsLinux.Hostnameits ownip=carries the name as well.Related issues
hull run --hostname, reported inhull version --jsonmain, the host name inip=sethostname()from/urunc-hostnameHow was this tested?
TestLinuxIPParamHostname;go test ./pkg/unikontainers/unikernels/passes on Linux amd64.ip=10.4.1.2::10.4.1.1:255.255.255.0:ubuntu-hosttest-ca9bbb82:eth0:offon the guest's kernel command line, anduname -n,/etc/hostnameandnerdctl inspectall readubuntu-hosttest-ca9bbb82. The same forclaude@refactor:claude-code-refactor-20d51f16.cmd/urunc/utils.goandmount_linux.go, dupl in hvt/spt), identical on 5c6bc70 without this commit.LLM usage
Claude Opus 5.5 (Claude Code) ported the patch onto this branch, wrote the unit test, and ran the checks above.
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).