Skip to content

fix(vm): create missing fd links during guest init - #5376

Draft
shiju-nv wants to merge 1 commit into
NVIDIA:mainfrom
shiju-nv:fix/5373-vm-guest-fd-links/shiju-nv
Draft

shiju-nv wants to merge 1 commit into
NVIDIA:mainfrom
shiju-nv:fix/5373-vm-guest-fd-links/shiju-nv

Conversation

@shiju-nv

@shiju-nv shiju-nv commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Create missing fd and standard-stream links after guest proc/dev mounts. Minimal Linux guests can then run the init script's Bash process substitution without relying on the VM runtime to populate those paths.

Related Issue

Closes #5373

Changes

  • Create guest-local /dev/fd, /dev/stdin, /dev/stdout and /dev/stderr aliases before first use.
  • Preserve existing canonical or equivalent entries; fail clearly on conflicting or unrelated dangling entries.
  • Test creation, repeated setup and conflict handling using the shipped shell function, and document its ownership.

Release Notes

Testing

Five focused guest-init tests and scoped all-targets Clippy passed on macOS. A separate Linux PID/mount-namespace check exercised the exact bootstrap function: the base failed at /dev/fd/63, while the patch passed process substitution and standard-stream I/O. Seven expected outcomes covered missing and existing aliases, conflicting/dangling entries and closed streams.

A fresh downstream integration build with the exact reviewed fd functions reached Ready with configuration accepted, ran authenticated exec with exit 0, and deleted successfully on both Firecracker and libkrun. The Linux ARM64/KVM host runs under QEMU TCG on this Mac; matching guest/helper inputs and the existing preparation helpers were retained.

Shell syntax, formatting and Markdown checks passed. ShellCheck reports the same existing SC2034 warning on base and patch; excluding that unchanged warning passes.

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Signed-off-by: Shiju <shiju@nvidia.com>
@shiju-nv shiju-nv added the test:e2e Requires end-to-end coverage label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Label test:e2e applied for 56fc5db. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway, sandbox, and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@copy-pr-bot

copy-pr-bot Bot commented Nov 8, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(vm): create missing fd links during guest init

1 participant