Skip to content

feat(cli): build Windows CLI and validate shared VM behavior across platforms - #92

Merged
reiase merged 7 commits into
mainfrom
feature/windows-cli-vm-contracts
Nov 1, 2026
Merged

reiase merged 7 commits into
mainfrom
feature/windows-cli-vm-contracts

Conversation

@reiase

@reiase reiase commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Build pvisor.exe on Windows for direct Linux VM execution, using the same vm-run arguments, guest configuration and authenticated exit handling as Linux and Apple Silicon macOS.

Code

  • Add pvisor vm-run --rootfs ROOT --cpus N --memory MiB [--readonly DIR] [--firmware LIBRARY] -- /guest-command ... through pvisor_vm::api. Rootfs writes persist directly.
  • Exclude Unix runtime dependencies from the Windows build. Build with cargo build --locked -p pvisor-cli --bin pvisor; reject unported commands.
  • Fix Windows directory rename leaving cached descendants bound to obsolete paths. Preserve inode IDs and lookup counts, with native and guest-visible regressions.
  • Fix OverlayNet reactor starvation under continuous peer traffic. Stabilize cache lifecycle tests by excluding error-backtrace symbolization from their unchanged deadlines, and check the reported exit cause.

CI

  • Windows: native MSVC CLI build/parser tests and existing VM contracts; build repository firmware on Linux, then run the actual CLI and WHP API smoke on Windows.
  • Linux: run the same CLI/guest workload on KVM. Store execution evidence under RUNNER_TEMP, outside restored Cargo caches; existing evidence directories remain protected against overwrite.
  • macOS: retain product builds/signing and conventional tests. Remove the real HVF workload from hosted CI at the user's request: GitHub's arm64 runners do not expose nested virtualization. Keep the common driver available for manual execution on a capable Apple Silicon Mac. Hosted macOS CI does not establish real HVF acceptance.
  • Each VM suite runs 12 boots by default, with 1/2 vCPU, exit codes 0/7/255, concurrent file operations, memory touches, timers, read-only rejection and cached directory rename. Host oracles check exact file results as well as exit status. Failed runs retain logs and reports.

Validation

During development:

  • Local HVF: 12 default boots plus 120 additional boots passed.
  • CLI: 129 tests; VM API/boundary: 14 tests; driver: 5 Python regressions passed.
  • OverlayNet: all 98 tests passed; the unchanged flood regression passed 50 consecutive runs.
  • Cache service: all five tests passed for ten rounds with outer backtraces enabled.
  • Windows MSVC cross-checks, workflow lint, formatting and strict bilingual docs builds passed.
  • Remote CI at cda63d4b: Windows native builds/WHP, Linux/KVM and macOS conventional tests passed. The Linux Go contract shard initially failed when log observation saw KVM_EXIT_FAIL_ENTRY (reason 18446744073709551615). Re-running that shard on the same commit passed the unchanged concurrent-start regression and the complete shard; the CI aggregate passed. The intermittent failure is not yet explained or fixed. Initial failure, passing rerun.

Support scope

Windows support covers vm-run, caller-owned rootfs and an optional read-only share. Job/container workflows, stage/review/apply, networking, snapshots, TUI/replay/Daemon and Windows packaging remain unported. Linux/macOS installations contain four host programs; Windows still needs the firmware DLL and a Linux rootfs/workload.

The platform document explains component dependencies, implementation differences and coverage. Hours-long stability, resource-leak baselines and concurrent VMs remain unverified. Strict local macOS Clippy for the full CLI was blocked by existing unused variables in pvisor-overlay-core/src/apply.rs:1698–1699.

@reiase
reiase merged commit a929abd into main Nov 1, 2026
55 of 57 checks passed
@reiase
reiase deleted the feature/windows-cli-vm-contracts branch November 1, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant