Skip to content

Paravirtualized Graphics via virtio-gpu: initial enablement and CLI f…#569

Open
Adityakk9031 wants to merge 2 commits into
apple:mainfrom
Adityakk9031:#480
Open

Paravirtualized Graphics via virtio-gpu: initial enablement and CLI f…#569
Adityakk9031 wants to merge 2 commits into
apple:mainfrom
Adityakk9031:#480

Conversation

@Adityakk9031

Copy link
Copy Markdown

Issue Summary

  • Containers run inside Virtualization.framework-backed VMs had no graphics device, preventing paravirtualized graphics acceleration or graphical output.

  • Users requested virtio-gpu support to enable accelerated offscreen rendering and optional display scanouts for Linux GUI workloads without spinning up full desktop VMs.
    Root Cause

  • VM configuration never attached a VZVirtioGraphicsDeviceConfiguration.

  • No API or CLI flags existed to request graphics acceleration or a display scanout.

  • As a result, VMs launched by the containerization framework were headless-only.
    Fix Overview

  • Add graphics configuration flags to VM and container configs:

    • graphicsDevice: enables the virtio-gpu device for acceleration
    • graphicsDisplay: enables a display scanout on the virtio-gpu device
  • Attach VZVirtioGraphicsDeviceConfiguration during VM construction when flags are set.

@Adityakk9031

Copy link
Copy Markdown
Author

@dcantah have a look

@Adityakk9031

Copy link
Copy Markdown
Author

@dcantah #480

stephenlclarke added a commit to stephenlclarke/containerization that referenced this pull request Jul 12, 2026
stephenlclarke added a commit to stephenlclarke/containerization that referenced this pull request Jul 12, 2026
Enable the arm64 guest driver and verify graphics configuration reaches the VM boundary. Builds on apple#569 for apple#480.
stephenlclarke added a commit to stephenlclarke/container that referenced this pull request Jul 12, 2026
Accept Docker-compatible run/create --gpus requests and carry them through Linux runtime data to the Apple virtio-gpu backend.

Supports the generic single-GPU forms all, count=1, device=0, and driver=virtio, while rejecting vendor drivers, options, extra capabilities, multiple GPUs, and non-zero device IDs before VM creation.

Projects /dev/dri/card0 and /dev/dri/renderD128 OCI device nodes and cgroup rules when GPU support is enabled.

Refs apple#1511, apple/containerization#480, apple/containerization#569.
stephenlclarke added a commit to stephenlclarke/container-compose that referenced this pull request Jul 12, 2026
Support Docker Compose service gpus and generic Deploy GPU reservations on the matched stephenlclarke runtime stack.

Maps gpus: all, count: 1, device_ids: [0], and driver: virtio requests to container run/create --gpus, and rejects NVIDIA/CUDA/vendor drivers, options, extra capabilities, multiple GPUs, non-zero device IDs, and non-GPU Deploy device reservations before side effects.

Adds a Docker Compose V2 GPU parity target, Swift orchestrator tests, Go normalizer tests, current STATUS.md coverage, and upstream handoff docs for apple/container and apple/containerization.

Keeps release metadata deterministic by resolving the containerization pin from the compose lockfile or the matched container lockfile when SwiftPM omits the duplicate direct pin.

Refs apple/container#1511, apple/containerization#480, apple/containerization#569.
stephenlclarke added a commit to stephenlclarke/containerization that referenced this pull request Jul 12, 2026
Add a typed graphics configuration for Virtualization.framework-backed Linux VMs, keep legacy graphics booleans as compatibility shims, and resolve requested guest-created device nodes from the booted VM before OCI process start. The GPU integration test now proves the virtio-gpu device is attached and records whether the active guest kernel exposes DRM nodes; the x86_64 kernel config now enables virtio-gpu DRM like arm64.

Release-Highlight: Adds Apple virtio-gpu VM configuration plus runtime-discovered guest device metadata, enabling callers to project /dev/dri nodes when the guest kernel exposes them.

Refs apple#480

Refs apple#569

Refs apple/container#1511
stephenlclarke added a commit to stephenlclarke/container that referenced this pull request Jul 12, 2026
Map supported Docker-compatible --gpus requests to the Apple virtio-gpu VM device while letting containerization discover guest DRM character-device metadata from the running VM. Pin the matched containerization revision from Package.resolved for Makefile-driven builds, expose builder-shim digest provenance, and pin/attest package release workflow actions.

Release-Highlight: Maps container run/create --gpus to the Apple virtio-gpu backend and projects guest DRM nodes when the guest kernel exposes them, while reporting the immutable builder-shim image digest used by the matched stack.

Refs: apple#1511, apple/containerization#480, apple/containerization#569, apple/container-builder-shim#87
stephenlclarke added a commit to stephenlclarke/homebrew-tap that referenced this pull request Jul 12, 2026
Pin the tap workflow action by SHA, enable Dependabot updates for GitHub Actions, and advance the source submodules to the matched Stephen-owned GPU/provenance stack commits.

Release-Highlight: Homebrew tap source snapshots now point at the matched GPU/provenance stack commits and keep release automation actions pinned by SHA.

Refs: apple/container#1511, apple/containerization#480, apple/containerization#569, apple/container-builder-shim#87
stephenlclarke added a commit to stephenlclarke/container-compose that referenced this pull request Jul 12, 2026
Require stable package dispatches to run make release-gate, add a stack-consistency check for matched runtime refs and builder image identity, pin workflow actions by SHA, attest release packages, and refresh GPU docs/handoffs around the Apple virtio-gpu runtime shape.

Release-Highlight: Stable releases now require make release-gate, which runs full CI plus Docker Compose parity before package dispatch.

Release-Highlight: Records the matched container b1917fb, containerization 41252f2, and builder-shim dbe6de4 stack refs, including the digest-pinned builder image.

Release-Highlight: Documents Compose gpus as Apple virtio-gpu support with runtime-discovered guest DRM projection, not Metal/CUDA/vendor passthrough. Upstream references: apple/container#1511, apple/containerization#480, apple/containerization#569, apple/container-builder-shim#87.

Refs: apple/container#1511, apple/containerization#480, apple/containerization#569, apple/container-builder-shim#87
stephenlclarke added a commit to stephenlclarke/homebrew-tap that referenced this pull request Jul 12, 2026
Advance the container-compose source submodule to the stack-gated GPU/provenance commit used for the next matched release.

Release-Highlight: Homebrew tap source snapshots now include the stack-gated container-compose release metadata and GPU parity docs.

Refs: apple/container#1511, apple/containerization#480, apple/containerization#569, apple/container-builder-shim#87
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.

3 participants