Skip to content

feat(vm): validate launch requirements against runtime capabilities - #5377

Open
shiju-nv wants to merge 3 commits into
NVIDIA:mainfrom
shiju-nv:feat/5372-vm-runtime-capabilities/shiju-nv
Open

shiju-nv wants to merge 3 commits into
NVIDIA:mainfrom
shiju-nv:feat/5372-vm-runtime-capabilities/shiju-nv

Conversation

@shiju-nv

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

Copy link
Copy Markdown
Collaborator

Summary

Resolve VM requirements against the selected backend's capabilities and allow CPU-only QEMU launches with external kernels. Keep PCI/GPU assignment separate, reject unsupported host/kernel/transport inputs before workload VMM startup, and preserve the assigned GPU through before-launch hooks.

Related Issue

Closes #5372

Prerequisite: #5376, which fixes #5373. This branch includes that patch so the new direct-kernel path has the required guest bootstrap setup. Merge the fd-link fix first.

Changes

  • Honor explicit backend requirements and check features against each backend's support.
  • Build CPU-only QEMU commands with vsock and no VFIO device; retain existing GPU sizing and devices.
  • Preflight Linux x86_64 host support, external kernel headers and transport/device prerequisites.
  • Reject before-launch hooks that clear or replace a GPU assignment.
  • Share kernel preflight across workload and image-preparation launcher entry; keep preparation on its libkrun bootstrap backend.
  • Document supported combinations, driver-owned backend validation and the before-launch hook contract; add regression coverage.

Release Notes

Testing

All 282 VM crate library tests passed on macOS, along with scoped all-targets Clippy and formatting. Three targeted mutations restored the old CPU/GPU restrictions or disabled the GPU-hook guard; each matching regression failed as expected. Tests cover CPU-only kernel selection and QEMU arguments, explicit conflicts, invalid kernel headers, both launcher modes, unsupported hosts and post-hook GPU assignment.

Fern docs and navigation checks passed with three warnings in unchanged gateway MDX, remote redirect access and theme contrast. The prerequisite fd patch passed its seven-case Linux namespace regression and fresh Firecracker/libkrun Ready/exec integration checks. Hosted Linux/KVM VM E2E passed for managed mode, the external driver and additional CA certificates. These jobs use the default libkrun backend; CPU-only QEMU Ready/exec on Linux x86_64/KVM remains unverified.

  • 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 45971ad. 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.

@shiju-nv
shiju-nv marked this pull request as draft November 8, 2026 19:09
@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.

@elezar elezar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe a naive question: Should this be handled at a driver level, or should this be exposed as a driver capability for a gateway to check?

@shiju-nv

shiju-nv commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

I think driver-side validation is the right place for this PR’s fix. If we want earlier gateway checks, we could add a driver preflight API as a follow-up. The driver needs to incorporate requirements from operator-installed extensions before it can resolve the backend and validate the final launch plan.

@shiju-nv
shiju-nv force-pushed the feat/5372-vm-runtime-capabilities/shiju-nv branch from 45971ad to 32118a3 Compare November 9, 2026 19:18
@shiju-nv shiju-nv added area:drivers Compute and secret drivers, host OS/architecture support, backend isolation, and lifecycle. topic:documentation Architecture docs, READMEs, project website updates, and automated documentation generation. labels Nov 9, 2026
@shiju-nv
shiju-nv marked this pull request as ready for review November 9, 2026 19:19
@purp purp added topic:extensions Extension APIs and integration points, consistent design, and external use cases. topic:gpu GPU scheduling, Kubernetes DRA, CDI, MIG, and hardware-accelerated runtime integration. labels Nov 15, 2026

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

area:drivers Compute and secret drivers, host OS/architecture support, backend isolation, and lifecycle. test:e2e Requires end-to-end coverage topic:documentation Architecture docs, READMEs, project website updates, and automated documentation generation. topic:extensions Extension APIs and integration points, consistent design, and external use cases. topic:gpu GPU scheduling, Kubernetes DRA, CDI, MIG, and hardware-accelerated runtime integration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(vm): create missing fd links during guest init feat(vm): check kernel and device requirements against the selected runtime

3 participants