Skip to content

doc: describe the implemented Ubuntu guest instead of its proposal - #453

Merged
Pedro Henrique Penna (ppenna) merged 2 commits into
devfrom
doc-sync/ubuntu-guest-design
Oct 9, 2026
Merged

Pedro Henrique Penna (ppenna) merged 2 commits into
devfrom
doc-sync/ubuntu-guest-design

Conversation

@ppenna

@ppenna Pedro Henrique Penna (ppenna) commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

doc/guests/ubuntu-guest.md (design chapter 7) was the pre-implementation proposal kept after the work landed: it was labeled Implemented but still read as a plan ("should", "will", phases, acceptance criteria, risks, and a to-do list of documentation changes), and several statements no longer matched the code. This PR rewrites it as a short, architecture-level description of the implemented Ubuntu initramfs and Ubuntu sandbox layer (844 → 191 lines), links to the Build, Run, usage, and distribution guides instead of repeating command details, and keeps the unimplemented full systemd guest as a Proposed section.

Only this file changes, so CI treats the PR as documentation-only. doc/design.md already links the chapter by the same path and title; no other document links into it.

Changes

Corrected statements:

Old statement Now Evidence
The kernel contains "the microVM LAPIC-frequency override" Removed; the patches add only the xe9 consoles and shared virtio-mmio interrupt status kernel/patches/ (0001–0003); bbc4040 dropped the LAPIC patch
The kernel "intentionally omits … module loading" It enables module support only for strict module memory protection, ships no modules, and /init disables loading at boot kernel/config-microvm (CONFIG_MODULES=y, CONFIG_STRICT_MODULE_RWX=y, no =m); guest/common/init (modules_disabled)
EROFS policy allows "file capabilities, ACLs, and security labels … through an explicit allowlist" The layer rejects every extended attribute scripts/nvx_tools/ubuntu.py metadata policy
Alpine "may also emit the generic marker"; Ubuntu emits the marker after the shell is ready (from /init) Ubuntu's Bash startup file prints NVX-GUEST-BOOT-OK: ubuntu guest/ubuntu/nvx-bashrc, guest/common/init
--guest all is valid for build commands Only build-guest accepts all (dropped from the chapter; usage.md covers options) python scripts/nvx.py build-initramfs --help, build-guest --help
Proposed CI coverage table ("Run … on KVM, MSHV, and WHP") Actual coverage: smoke scenarios on every backend, broader scenarios on Linux/KVM, sandbox layer and live-share smoke on Linux backends, no performance gates .github/workflows/run-nvx-microvm-tests.yml, ci.yml (KVM, MSHV, WHP callers); benchmark --help has no --guest

Newly stated, verified behavior: Alpine is the only sandbox control initramfs (guests.py sandbox_control, sandbox launcher uses the Alpine initramfs); the 512 MiB default (run --help); the supplemental package lock and its seven packages (ubuntu/packages.lock.json); the extractor's rejections and maintainer-action allowlist (ubuntu.py, build_constants.py); root customization and account checks (ubuntu.py); build-distro-layer accepts only --guest ubuntu, requires --replace to overwrite, and refuses /sbin/init or a systemd package (build.py); the EROFS UUID derivation (ubuntu.py); the workload's namespaces and privilege drop (guest/alpine/nvx-container-launch, nvx-container-enter); sandbox systemd rejection (scripts/nvx.py); manifest fields and release validation (ubuntu.py, release.py); verify checks the Ubuntu pin against SOURCE-MANIFEST.json (release.py); console-snapshot is rejected for Ubuntu (microvm_tests.py).

Removed as obsolete planning material: Decision/Motivation (condensed to one rationale paragraph), Goals/Non-goals, Implementation sequence, Acceptance criteria, Risks, Documentation changes, the stale "Last updated" header, and the speculative platform-independent guest bundle.

Conservative choices: kept the chapter at its current path and title so doc/design.md and readers' bookmarks stay valid; kept the 320 MiB minimum in doc/run.md and linked to it rather than restating it.

No OpenVMM design contract changed; pinned OpenVMM is 3796991d52ce07d88b5dba25e4d1e8deaff6fd95 (dev 75f5ba35f).

Follow-ups

Validation

  • python -m unittest scripts.test_nvx_tools.CliTests scripts.test_performance.PerformanceTests — Ran 110 tests, OK (skipped=1).
  • Throwaway link checker (outside the repo) over the changed file and doc/design.md, which links to it: all relative links and anchors resolve, one H1, balanced code fences, and doc/design.md links every chapter in doc/design/ — OK.
  • git diff --check — clean.
  • python scripts\nvx.py verify — source tree and submodule metadata are consistent.

The Ubuntu guest chapter was the pre-implementation proposal, labeled
Implemented, with goals, phases, acceptance criteria, and a to-do list of
documentation changes. Several statements no longer matched the code: the
kernel no longer carries a LAPIC-frequency override, it enables module
support, the layer metadata policy rejects every extended attribute, the
Ubuntu boot marker comes from the Bash startup file, and only build-guest
accepts --guest all.

Rewrite it as an architecture-level description of the implemented
initramfs and sandbox layer, link to the build, run, usage, and
distribution guides for commands, and keep the full systemd guest as a
Proposed section.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 18:15
@ppenna Pedro Henrique Penna (ppenna) added the documentation Improvements or additions to documentation label Oct 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The CI section incorrectly describes sandbox smoke coverage as Linux-only despite Windows/WHP coverage.

1 open finding
What changed in this PR

Rewrites the stale Ubuntu guest proposal as documentation of the implemented architecture.

Changes:

  • Documents Ubuntu initramfs and sandbox-layer behavior.
  • Describes build, security, provenance, release, and validation policies.
  • Retains full systemd guest support as proposed work.
File Description
doc/​guests/​ubuntu-guest.md Replaces planning material with implemented Ubuntu guest architecture.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread doc/guests/ubuntu-guest.md Outdated
Propose full Ubuntu systemd guest documentation.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 18:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The sandbox isolation description omits that workloads share the guest IPC namespace.

0 open findings

1 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Low severity Document shared IPC namespace in sandbox isolation boundary

doc/​guests/​ubuntu-guest.md:146

The launcher uses unshare --mount --pid --uts (guest/alpine/nvx-container-launch:16), so the workload shares the guest's IPC namespace as well as its network namespace. Because this paragraph defines the sandbox isolation boundary, omitting shared IPC can make the boundary appear stronger than it is; include it in the shared list.

🧠 Review effort: Balanced

@ppenna
Pedro Henrique Penna (ppenna) merged commit 57b4a42 into dev Oct 9, 2026
28 checks passed
@ppenna
Pedro Henrique Penna (ppenna) deleted the doc-sync/ubuntu-guest-design branch October 9, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants