feat(cli): forkd doctor — 4 new checks (hw-virt / FC version / docker / disk space)#142
Merged
Merged
Conversation
…er, disk space) Extends \`forkd doctor\` from 10 → 14 checks. New ones target the common silent-failure modes new users hit: - hw virt: scans /proc/cpuinfo for vmx (Intel) or svm (AMD). Fails early with a clear \"enable virtualization in BIOS\" hint instead of letting Firecracker error out a few seconds later. - firecracker version: parses \`firecracker --version\`. PASS for >=1.10 (the version v0.3 forkd was tested against), WARN for 1.5-1.9 (diff snapshots present but pre-1.10), FAIL for <1.5. - docker: \`docker info\`. Only needed by \`forkd from-image\` / \`forkd parent build\`; emits WARN (not FAIL) when absent or unreachable so users without docker can still pass doctor. Detects the \"permission denied\" case and emits the usermod hint specifically. - snapshot dir space: statvfs(3) on the snapshot dir (or nearest existing parent). PASS ≥5 GiB, WARN ≥1 GiB, FAIL <1 GiB. Adds libc 0.2 as a cfg(unix) dep for statvfs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9e46015 to
a3f4084
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.
Summary
Extends `forkd doctor` from 10 → 14 checks. Targets the silent-failure modes new users hit before reaching the existing checks.
Smoke test on dev box (live, after this PR)
```
✓ platform Linux version 6.14.0-36-generic
✓ hw virt vmx (CPU supports virtualization)
✓ kvm /dev/kvm OK
✓ cgroup v2 cpuset cpu io memory hugetlb pids rdma misc dmem
✓ ip_forward 1 (forwarding enabled)
⚠ tap device forkd-tap0 (down)
→ sudo ip link set forkd-tap0 up — or rerun scripts/host-tap.sh
✓ per-child netns 5 provisioned
✓ firecracker /usr/local/bin/firecracker
✓ firecracker version v1.12.0
⚠ kernel image no vmlinux found in common locations
✓ snapshot dir /home/yangdongxu/.local/share/forkd/snapshots (107 snapshots)
✓ snapshot dir space 654.8 GiB free at /home/yangdongxu/.local/share/forkd/snapshots
✓ docker daemon reachable
✓ daemon http://127.0.0.1:8889 responding
pass=12 warn=2 fail=0 skip=0
```
What each new check answers
Files
🤖 Generated with Claude Code