Microsoft Embeds Linux Containers in WSL With First-Party CLI and APIs

WSL improvements and the new Containers CLI and APIs | DEM346 — Microsoft Developer

Microsoft Developer

By baking container orchestration directly into WSL utility virtual machines, Microsoft eliminates external daemon dependencies and lets developers embed sandboxed Linux workloads natively into Windows applications.

AI-assisted summary of WSL improvements and the new Containers CLI and APIs | DEM346 — original source. Check the original for full context.

Source published:

Key ideas

  • Microsoft announced native WSL Containers, allowing developers to execute Linux containers on Windows without third-party daemons or virtualization runtimes via the new wslc CLI or a programmatic NuGet package API. (0:01)
  • The platform provisions dedicated utility virtual machines and isolated VHDs per application, enforcing hypervisor-level isolation and communicating via point-to-point Hyper-V sockets rather than network adapters. (16:39)
  • WSL Containers uses Virtio-FS for cross-OS volume mounts, delivering roughly double the filesystem I/O performance of the legacy Plan 9 protocol between Windows NTFS and Linux containers. (19:42)
  • A public preview is slated for late June, alongside upcoming WSL support for Microsoft's lightweight, container-optimized Azure Linux 3.0 distribution. (22:41)

Detailed notes

## Background Published by Microsoft Developer on YouTube on June 3, 2026, this Microsoft Build 2026 demo session (DEM346) is presented by Craig Loewen and Pooja Trivedi. According to the session description, it covers core end-to-end improvements to the Windows Subsystem for Linux (WSL) alongside a brand-new container command-line interface and programmatic APIs designed for Windows applications.

## TL;DR Microsoft introduces WSL Containers, bringing native Linux container orchestration directly into WSL without requiring separate third-party runtimes or background daemons. The architecture provides dual entry points: an interactive `wslc` CLI modeled on standard container tooling and a programmatic NuGet package (`WSLCSDK`) enabling Windows applications to embed isolated Linux workloads seamlessly. Under the hood, individual client applications and CLI workflows run inside isolated utility virtual machines communicating over point-to-point Hyper-V sockets, leveraging dedicated VHDs and Virtio-FS for high-performance host file sharing. The session also showcases hardware GPU passthrough for PyTorch AI compilation, enterprise compliance with Microsoft Intune and Microsoft Defender for Endpoint, and an upcoming container-optimized Azure Linux 3.0 distro package.

## Atmosphere & style The presentation is crisp, energetic, and thoroughly developer-centric, balancing rapid-fire terminal demonstrations with clear architectural breakdowns. Craig Loewen and Pooja Trivedi share an easygoing, tag-team rhythm, peppering live demos with lighthearted humor about avoiding 'Faustian rituals' and running destructive AI agents like 'Herbert' within safe blast radiuses. Watching it feels like a fast-paced technical deep dive where the excitement comes from eliminating traditional virtualization friction, culminating in production-grade showcases like DreamWorks' Moonray rendering engine running effortlessly on Windows.

## Bulletin - [00:01](https://www.youtube.com/watch?v=i0M13ZvL04M&t=1s) Microsoft announced native WSL Containers, allowing developers to execute Linux containers on Windows without third-party daemons or virtualization runtimes via the new wslc CLI or a programmatic NuGet package API. - [16:39](https://www.youtube.com/watch?v=i0M13ZvL04M&t=999s) The platform provisions dedicated utility virtual machines and isolated VHDs per application, enforcing hypervisor-level isolation and communicating via point-to-point Hyper-V sockets rather than network adapters. - [19:42](https://www.youtube.com/watch?v=i0M13ZvL04M&t=1182s) WSL Containers uses Virtio-FS for cross-OS volume mounts, delivering roughly double the filesystem I/O performance of the legacy Plan 9 protocol between Windows NTFS and Linux containers. - [22:41](https://www.youtube.com/watch?v=i0M13ZvL04M&t=1361s) A public preview is slated for late June, alongside upcoming WSL support for Microsoft's lightweight, container-optimized Azure Linux 3.0 distribution.

## Key takeaways - [00:01](https://www.youtube.com/watch?v=i0M13ZvL04M&t=1s) WSL Containers is built directly into the existing WSL package, requiring no standalone third-party container engines or background daemons. - [00:01](https://www.youtube.com/watch?v=i0M13ZvL04M&t=1s) The platform is engineered for enterprise environments, integrating out of the box with Microsoft Defender for Endpoint (MDE) and Microsoft Intune. - [01:33](https://www.youtube.com/watch?v=i0M13ZvL04M&t=93s) The native wslc binary (aliased to 'container') mirrors open-source container commands like run, ps, build, and attach to preserve developer muscle memory. - [03:54](https://www.youtube.com/watch?v=i0M13ZvL04M&t=234s) Host port forwarding and volume binding operate natively across the virtualization boundary, complemented by over 160 GNU Coreutils ported directly to Windows PowerShell. - [07:07](https://www.youtube.com/watch?v=i0M13ZvL04M&t=427s) Hardware GPU acceleration is supported via a single flag (--gpus all), allowing containerized AI workloads to run PyTorch and compiled Triton kernels directly on host GPUs. - [09:07](https://www.youtube.com/watch?v=i0M13ZvL04M&t=547s) The architecture offers two entry points for the same underlying engine: interactive terminal workflows via wslc and programmatic embedding via the WSLCSDK NuGet package. - [09:07](https://www.youtube.com/watch?v=i0M13ZvL04M&t=547s) Microsoft designed WSL Containers to coexist with Docker Desktop, Rancher Desktop, and Podman, with core VM and filesystem optimizations benefiting the entire ecosystem. - [10:58](https://www.youtube.com/watch?v=i0M13ZvL04M&t=658s) Independent software vendors can run ephemeral Linux tools seamlessly, demonstrated by DreamWorks' Moonray ray-tracing engine executing via a short-lived VM without native Windows ports. - [14:02](https://www.youtube.com/watch?v=i0M13ZvL04M&t=842s) Developers can embed Containerfile recipes directly into .NET project files, enabling a unified F5 build, launch, and debugging inner loop in Visual Studio. - [14:02](https://www.youtube.com/watch?v=i0M13ZvL04M&t=842s) Host isolation and granular folder mounting restrict the blast radius of untrusted code or autonomous AI agents operating on local directories. - [16:39](https://www.youtube.com/watch?v=i0M13ZvL04M&t=999s) Each client application and the wslc CLI run inside an isolated, dedicated utility VM and manage runtime metadata in an independent VHD backed by the Moby container engine. - [16:39](https://www.youtube.com/watch?v=i0M13ZvL04M&t=999s) Host-to-guest instructions bypass network stacks, communicating directly between wslservice.exe and the container runtime via Hyper-V sockets (AF_HYPERV). - [19:42](https://www.youtube.com/watch?v=i0M13ZvL04M&t=1182s) Cross-platform folder sharing adopts Virtio-FS, achieving approximately 2x performance gains over the Plan 9 (9P) protocol previously used by WSL. - [21:42](https://www.youtube.com/watch?v=i0M13ZvL04M&t=1302s) Azure Linux 3.0 provides full single-vendor supply-chain attestation across Azure, AKS, and an upcoming lightweight distribution package for WSL.

## Detailed walkthrough ### [00:01](https://www.youtube.com/watch?v=i0M13ZvL04M&t=1s) Three Core Takeaways of WSL Containers

Pooja Trivedi, an architect leading developer experiences in AI for Linux on Windows, introduces the session alongside Craig Loewen, a product manager working on the Windows Subsystem for Linux and developer AI tooling. Together, they unveil a major new capability: WSL containers. Craig emphasizes that attendees only need to retain three foundational takeaways about the project: local execution, frictionless integration into the existing Windows Subsystem for Linux, and enterprise readiness.

Developers will be able to run Linux containers natively and locally on Windows, either interactively using a new command-line interface or programmatically via an API embedded directly inside Windows client applications. Crucially, this is not a separate product requiring its own standalone deployment or complex setup; it is shipped as an integral feature of WSL itself. “So this will just be a new feature that you get directly as part of WSL,” Craig explains, noting that users will receive it automatically as an update to their existing setup. Finally, the platform is designed from day one to meet strict corporate compliance and security requirements, integrating smoothly with standard management suites such as Microsoft Defender for Endpoint (MDE) and Microsoft Intune.

- **Local Linux container execution:** Run Linux containers directly on Windows using an interactive CLI or a native API. - **Zero-friction delivery:** Built straight into the existing WSL package with no separate runtime or virtualization toolchain to download. - **Enterprise-ready compliance:** Operates seamlessly with industry-standard endpoint security and management infrastructure like MDE and Intune.

---

[01:33](https://www.youtube.com/watch?v=i0M13ZvL04M&t=93s) The `wslc` CLI and Basic Container Lifecycle

Transitioning directly into a live console demo, Pooja explains that once released, developers will gain access to the full suite of WSL container capabilities through a routine WSL update. She jokes that getting up and running requires “no downloading of third-party tools, no starting of daemons, no Faustian rituals.” Instead, WSL delivers a first-party command-line interface binary named `wslc`, which is also internally aliased to `container` for users accustomed to typing that command.

```mermaid flowchart LR accTitle: WSL Containers Architecture Engine accDescr: Diagram showing the CLI and API interfaces routing into the shared WSL virtual machine engine.

subgraph AccessDoors["Interaction Layers"] CLI["WSLC CLI / container"] API["NuGet Package API"] end

subgraph CoreEngine["Underlying Engine"] VM["Shared WSL Virtual Machine"] LinuxKernel["Linux Kernel & Container Runtime"] end

CLI --> VM API --> VM VM --- LinuxKernel ```

The syntax, subcommands, and flags of `wslc` mirror established open-source container tooling to ensure muscle memory carries over immediately. To showcase the baseline lifecycle, Pooja launches an interactive Debian Linux container using `wslc run -it debian`. While `wslc` typically pulls missing container images automatically from public container registries, she pre-cached the image on her laptop to bypass conference network instability. Inside the container shell, she demonstrates detaching cleanly via the standard `Ctrl+P, Ctrl+Q` key combination. Running `wslc ps -a` (or its equivalent, `wslc container list`) verifies that the Debian container remains alive in the background. She then reattaches to the session using `wslc attach` with the container name/ID, executes standard operations, and finally types `exit` to terminate the process, confirming its stopped state with another `wslc ps -a` query.

- **Command binary:** Shipped as `wslc`, with an internal alias to `container`. - **Familiar CLI syntax:** Supports standard subcommands including `run`, `ps -a`, `container list`, and `attach`. - **Interactive terminal support:** Standard `-it` switch supplies a pseudo-TTY and interactive stdin, detach sequence follows standard `Ctrl+P, Ctrl+Q`.

---

[03:54](https://www.youtube.com/watch?v=i0M13ZvL04M&t=234s) Building Custom Container Images and Host Integration

Beyond running stock distributions, developers frequently need to bring complex production or cloud microservices down to their primary Windows workstation for fast inner-loop development, testing, and debugging. Packaging workloads into containers eliminates the classic "works on my machine, fails in production" disparity. Pooja demonstrates this pattern by opening a standard `Containerfile`, which defines the exact software recipe, base layers, environment variables, dependencies, and entrypoint instructions needed to build an artifact.

Her demo project is an inspection utility named "Linux Spy," which runs a collection of Linux forensic and file-inspection tools against arbitrary uploads via an embedded web server listening on port 5000. The `Containerfile` starts from a minimal `python:3.12` base image, installs required system packages, copies the application source code into the container filesystem, specifies that port 5000 should be exposed, and defines the launch command. She compiles the image by issuing `wslc build -t mylinuxspy -f Containerfile.`.

Inspecting the local image registry with `wslc images`, Pooja pipes the output into `grep` directly within PowerShell. She takes a moment to highlight a major Windows ecosystem enhancement: Microsoft has ported roughly 168 native GNU/Linux coreutils directly into Windows, allowing native cross-platform terminal scripting. She then spins up the newly built image using port mapping (`-p 5000:5000`). Opening a browser on the Windows host and navigating to `http://127.0.0.1:5000`, she accesses the Linux Spy web UI locally, confirming that host-to-container port translation functions seamlessly across the virtualization boundary.

- **Reproducible builds:** Uses standard `Containerfile` / Dockerfile syntax to specify base layers, dependencies, and launch parameters. - **Build execution:** Executed directly from PowerShell via `wslc build -t <tag> -f <file>.`. - **Windows Coreutils:** Approximately 168 GNU Coreutils binaries are ported natively to Windows, enabling utilities like `grep` inside PowerShell pipelines. - **Port mapping:** Exposed internal ports are mapped to the Windows host with `-p <host_port>:<container_port>`, allowing direct access via `localhost` / `127.0.0.1`.

---

[07:07](https://www.youtube.com/watch?v=i0M13ZvL04M&t=427s) Hardware GPU Acceleration and AI Workloads

To highlight advanced performance capabilities, Pooja transitions from lightweight web services to a heavy local artificial intelligence workload that directly taps into the host machine's physical GPU. Running accelerated machine learning frameworks inside virtualized Linux containers on Windows has historically presented driver and passthrough friction. Under WSL containers, host graphics hardware is shared natively into the container environment with a single flag.

Pooja starts a pre-warmed container hosting a Jupyter Notebook web interface mapped to host port 8888. Inside the notebook, she initiates an end-to-end model fine-tuning pipeline using a GPT-2 transformer. The script downloads the weights, fine-tunes the network using PyTorch on the host's physical GPU, and invokes `torch.compile` to generate highly optimized, fused Triton kernels. To prove the execution efficiency, the notebook runs a benchmark race comparing the eager-mode baseline model against the Triton-compiled model, visually illustrating the massive inference speedup achieved by compiling kernels directly on the hardware.

Reviewing the terminal command used to launch the AI workload, Pooja breaks down the flags: ```text wslc run -it -p 8888:8888 -v <Windows_HF_Cache_Path>:<Container_Cache_Path> --gpus all <image_name> ``` The `-v` switch mounts the local Hugging Face cache directory from the Windows NTFS host directly into the Linux container path so massive model checkpoints are not re-downloaded or duplicated. Meanwhile, the `--gpus all` switch commands the WSL container runtime to bind all available host GPU compute resources straight into the containerized Linux environment.

- **GPU Passthrough flag:** `--gpus all` allows PyTorch, CUDA, and Triton to bind directly to host hardware inside the container. - **Host volume mounting:** Uses `-v` to share host directories (such as local model caches) directly across file systems. - **Kernel compilation:** Supports advanced compilation toolchains, including `torch.compile` and custom fused Triton kernels.

---

[09:07](https://www.youtube.com/watch?v=i0M13ZvL04M&t=547s) Dual Access Models and the Motivation for WSL Containers

Returning to the slide presentation, Craig summarizes the two distinct architectural entry points into WSL containers: the interactive `wslc` CLI and an upcoming programmatic API delivered via a NuGet package. He describes them as “basically two different doors for the same engine,” explaining that both the developer terminal commands and programmatic background calls funnel into the exact same lightweight WSL virtual machine that already powers standard WSL Linux distributions.

```mermaid flowchart TD accTitle: Targeted Audience for WSL Containers accDescr: Breakdown of customer profiles targeted by Microsoft for WSL containers.

WSLC["WSL Containers"] WSLC --> Prof1["Profile 1: Container Developers"] WSLC --> Prof2["Profile 2: Application Builders"]

Prof1 --> GoalA["Streamlined Setup on Windows"] Prof1 --> GoalB["Opinionated CLI + API Synergy"] Prof1 --> GoalC["Open-Source CoreVM Improvements"]

Prof2 --> GoalD["Embedding Linux Engines into Win32 Apps"] ```

Craig addresses the fundamental engineering question: why did Microsoft build a proprietary container CLI instead of simply bundling third-party tools like Docker, Podman, or Rancher Desktop? The answer centers on serving specific customer profiles with tightly coupled features. For everyday container developers, Microsoft wanted an opinionated, out-of-the-box solution where the command-line interface and client APIs operate in close harmony, permitting custom extensions and tight operating system integration.

Craig makes it clear that Microsoft is not attempting to displace the broader ecosystem: “However, those tools all work great, and if they still solve problems for you, you should use them.” Because WSL remains open source, any fundamental performance enhancements developed for WSL containers—such as cross-OS filesystem I/O optimizations between Windows NTFS and Linux ext4 virtual hard disks—accrue immediately to Docker Desktop, Rancher Desktop, and Podman Desktop running on top of WSL. Craig then introduces the second key target audience: application builders who want to embed self-contained Linux services and rendering runtimes directly into their Windows desktop software.

- **Dual-door architecture:** `wslc` CLI handles interactive local workflows; a dedicated NuGet package API allows programmatic application orchestration. - **Shared virtualization engine:** Both entry points utilize the same underlying WSL2 VM architecture that hosts standard Linux distributions. - **Ecosystem coexistence:** Docker Desktop, Podman, and Rancher Desktop remain fully supported and directly inherit underlying VM and cross-OS filesystem speed improvements.

[10:58](https://www.youtube.com/watch?v=i0M13ZvL04M&t=658s) Enterprise Management and the Moonray Rendering Engine Collaboration

The WSL Containers architecture is built directly for independent software vendors (ISVs) and enterprise IT administrators who want to bridge Linux ecosystems with Windows environments without introducing administrative headaches. Craig Loewen explains that enterprise IT teams often want to deploy modern Linux-based tools or AI agents locally within a containerized environment, yet need full operational visibility and the ability to manage machines through established Windows management tooling like Microsoft Intune and Microsoft Defender for Endpoint (MDE). Instead of dealing with an unmanageable, opaque virtual machine hidden on corporate endpoints, this setup preserves existing compliance controls: “I want to make sure that you get that powerful isolation without having to worry about your security tools not being able to break that boundary,” Craig notes.

```mermaid flowchart LR accTitle: Moonray Rendering Execution Flow accDescr: Diagram showing Windows host executing moonray.exe which launches an ephemeral WSL container VM, renders on the CPU, and outputs a JPEG back to Windows.

subgraph Host["Windows Host Environment"] EXE["moonray.exe (CLI Entry)"] Inputs["Render Files (*.rdlb)"] Output["Output Image (*.jpg)"] end

subgraph VM["Ephemeral Moonray VM"] Engine["Moonray Linux Engine"] Compute["CPU Raytracing"] end

EXE -->|"passes paths (C:\...)"| Engine Inputs --> Engine Engine --> Compute Compute -->|"renders JPEG"| Output Engine -.->|"shuts down on completion"| Host ```

To illustrate how seamless this model is for third-party software vendors, Craig highlights Microsoft's work with the team behind DreamWorks' open-source Moonray rendering engine. Moonray is an advanced, production-grade ray-tracing platform built exclusively for Linux and used in major animated feature films like *The Bad Guys 2* and *The Wild Robot*. In a live demo, Craig invokes `moonray.exe` from a standard Windows command prompt, supplying native Windows backslash file paths containing `.rdlb` (render input) files and instructing it to produce a `.jpg`. Behind the scenes, the WSL Containers API instantly spins up an ephemeral Moonray virtual machine, pegs the CPU to execute the ray-tracing calculations, outputs an image of a transparent orange coffee maker, and immediately terminates the utility VM to return all system resources back to Windows. Because the container startup and teardown happen within seconds, the tool operates indistinguishably from a native Windows binary.

- Moonray is an open-source, production ray-tracing engine built from the ground up on Linux. - IT teams can maintain endpoint visibility through standard enterprise management suites like Microsoft Intune and Microsoft Defender for Endpoint (MDE). - Container startup is nearly instantaneous, allowing short-lived CLI tasks to launch, process, and release hardware resources immediately.

---

[14:02](https://www.youtube.com/watch?v=i0M13ZvL04M&t=842s) Developer Inner Loop and the "Herbert" Blast-Radius Demo

To bring this execution model into everyday development workflows, the WSL team packaged the integration layer into a clean C#/.NET library. Pooja Trivedi points out that the entire lifecycle of the container and its hosting virtual machine is abstracted away from the end user: “All you're doing is you're creating and managing containers via the API.” In Visual Studio, developers add the WSL Containers NuGet package (`WSLCSDK`) to their project file. Inside the `.csproj`, an `<ItemGroup>` references the local `Containerfile` residing directly in the application source tree. Hitting F5 automatically builds the container image and launches the application alongside its containerized services as a single, unified debugging session.

To show the programmatic API in action, Craig showcases a playful sample application featuring an autonomous AI stock-trading agent named "Herbert." Running inside an isolated Linux container, Herbert manages mock equities on a virtual desktop while running real background services. However, Craig programmed Herbert with a destructive quirk: a routine that randomly deletes files off the filesystem. Because the container exposes a network port back to the Windows host, Craig inspects Herbert's operations through an integrated desktop viewer. When the agent deletes files, they are genuine filesystem deletions on the host, but restricted exclusively to an isolated directory mounted at `C:\temp\Herbert`. Craig explains that developers have precise control over network port forwarding and folder mounts: “You can specify, I only wanted to access this file on Windows. So I minimize the blast radius.” This sandbox guarantee allows untrusted or experimental code to manipulate host assets without risking system-wide damage.

- Container definitions (`Containerfile`) live directly alongside native source code in the project directory. - Developers experience a seamless F5 inner loop where container image building and launching happen automatically during project build. - Host integration supports granular directory mounting to enforce strict blast-radius controls against errant container processes.

---

[16:39](https://www.youtube.com/watch?v=i0M13ZvL04M&t=999s) Architecture: Hypervisor Isolation, WSL Service, and HV Sockets

Pooja Trivedi outlines the internal architecture powering WSL Containers, contrasting the Windows host environment with the underlying guest utility virtual machines. Rather than funneling every container into a single shared virtual environment, WSL provisions an independent, lightweight utility VM for every requesting Windows application, as well as an isolated VM dedicated to the `wslc` CLI flow. This model enforces a strict Hyper-V hypervisor boundary between individual client applications, eliminating naming collisions, network conflicts, and volume contention across distinct programs.

```mermaid flowchart TD accTitle: WSL Containers Architecture accDescr: Architecture diagram illustrating the host components communicating over an HV socket to the isolated Linux VM running the Moby container engine.

subgraph WindowsHost["Windows Host Operating System"] direction TB App["Windows App (via WSLCSDK)"] CLI["wslc.exe (Command Line)"] WSLService["WSL Service (wslservice.exe)"] VHD["App Virtual Hard Disk (*.vhdx)"]

App -->|"IPC"| WSLService CLI -->|"IPC"| WSLService end

subgraph GuestVM["Dedicated Utility Linux VM (per App / CLI)"] direction TB HVSock["Hyper-V Socket (HV Socket)"] Moby["Moby Container Engine"] Containers["Linux Containers"]

HVSock --> Moby Moby --> Containers end

WSLService <-->|"AF_HYPERV (Point-to-Point)"| HVSock VHD <-->|"/var/lib/docker Mount"| Moby ```

The system offers two primary entry points: the programmatic API via the `WSLCSDK` NuGet package, and the `wslc.exe` command-line executable. Both interfaces communicate over inter-process communication (IPC) with `wslservice.exe`, the long-standing Windows service responsible for managing WSL distribution lifecycles and host-guest communication. The WSL service was augmented to supervise container runtimes within the new utility VMs. To issue instructions to the Linux guest—which currently runs the open-source Moby container engine—the WSL service opens a Hyper-V socket (HV socket):

> “It is not a network socket, it's a specialized socket that is used specifically for communication between the VM and the hypervisor.” — Pooja Trivedi

Because an HV socket is a specialized point-to-point extension of the Winsock API (`AF_HYPERV`), it forms an isolated, hypervisor-mediated communication channel directly between `wslservice.exe` and the Moby runtime without touching traditional network stacks.

- Every Windows application running WSL containers receives its own dedicated utility virtual machine. - Container names, networks, and storage namespaces are isolated on a per-VM basis to prevent cross-app conflicts. - Host-to-guest instructions bypass general network adapters by using point-to-point Hyper-V sockets (`AF_HYPERV`).

---

[19:42](https://www.youtube.com/watch?v=i0M13ZvL04M&t=1182s) Storage Separation and Virtio-FS File Sharing

Storage management in WSL Containers is decoupled across two tiers: persistent internal container data and host-mounted shared directories. For internal runtime data, the Moby container engine writes to a standard Linux storage directory (such as `/var/lib/docker`) containing container scratch layers, images, and runtime metadata. Under the hood, this entire directory is backed by an independent Virtual Hard Disk (VHD) on the Windows host. Each application and the CLI tool gets its own dedicated VHD, preventing distinct applications from viewing or corrupting each other's local container states.

```mermaid flowchart LR accTitle: Volume Mounting with Virtio-FS accDescr: Diagram showing a Windows folder mapped through Virtio-FS into a Linux container mount point.

subgraph Host["Windows Host Filesystem"] WinDir["C:\data"] end

subgraph Translation["Filesystem Protocol Layer"] Virtio["Virtio-FS (virtiofs)"] end

subgraph Guest["Container Environment"] LinuxMount["/data (Debian latest)"] end

WinDir <--> Virtio Virtio <--> LinuxMount ```

When an operator or application mounts a host folder into a container—such as running `wslc run -it -v C:\data:/data debian:latest`—the WSL runtime bridges the host folder (`C:\data`) to the container mount point (`/data`) using Virtio-FS (`virtiofs`). Virtio-FS is a modern shared-filesystem protocol specifically engineered to share file structures between hypervisors and virtual machines. Pooja emphasizes that translating POSIX and Windows filesystem semantics across distinct operating systems represents an engineering challenge. Compared to the Plan 9 (9P) networking protocol traditionally leveraged by WSL, Virtio-FS achieves substantial throughput gains: “Virtio-FS is about twice as fast as it stands today in this environment,” with additional performance optimizations underway.

- Internal container metadata, base layers, and writable scratch disks are encapsulated inside a dedicated `.vhdx` file per application. - Cross-platform volume binds rely on Virtio-FS (`virtiofs`) rather than the older Plan 9 protocol. - Current Virtio-FS implementations deliver roughly double the I/O performance of Plan 9 when translating semantics between Windows and Linux.

[21:42](https://www.youtube.com/watch?v=i0M13ZvL04M&t=1302s) Azure Linux 3.0 Availability and WSL Distro Roadmap

Before concluding the presentation on WSL containers, the speakers take a quick detour to highlight another major development across the broader Windows Subsystem for Linux ecosystem: the general availability of Microsoft's Linux distribution, Azure Linux 3.0. Emphasizing its enterprise lineage, the presenter points out that this is the exact same distribution that runs Azure Kubernetes Service (AKS) and underpins Microsoft's broader Azure infrastructure today. Leveraging Azure Linux gives developers access to a highly consistent, battle-tested, and proven environment directly on their machines.

A central advantage of adopting Azure Linux is the end-to-end security and vendor consolidation Microsoft provides. Because Microsoft builds and maintains the full Linux operating system stack, organizations benefit from complete supply-chain attestation stretching from initial compilation straight through to final deployment. As the speaker explains:

> “Microsoft provides the entire stack for Linux, so it's a single vendor, full supply chain attestation from build to deployment.”

This unified model gives enterprise customers confidence and clarity regarding support, ensuring teams know precisely where to turn whenever issues arise. While Azure Linux 3.0 is currently accessible for virtual machines, a dedicated WSL distribution package is slated for release in the near future. The distribution is described as lightweight and container-optimized, making it a compelling option for local development when it lands on WSL.

```mermaid flowchart TD accTitle: Azure Linux 3.0 Ecosystem and Supply Chain accDescr: Diagram illustrating Azure Linux 3.0 powering both Azure AKS and WSL environments with full supply chain attestation.

subgraph SEC["Microsoft Supply Chain"] direction TB B["Build"] --> A["Attestation"] A --> D["Deployment"] end

subgraph TARGETS["Deployment Targets"] direction TB AKS["Azure Kubernetes Service (AKS)"] VM["Azure Virtual Machines (Available Today)"] WSL["WSL Distribution (Coming Soon)"] end

SEC --> AKS SEC --> VM SEC --> WSL ```

- **Azure Linux 3.0**: Now generally available for VM workloads and serves as the foundation powering AKS and Azure infrastructure. - **Supply Chain Security**: End-to-end verification and accountability backed by Microsoft as a single vendor. - **WSL Integration**: An upcoming container-optimized, lightweight Azure Linux distro tailored specifically for WSL environments.

---

[22:41](https://www.youtube.com/watch?v=i0M13ZvL04M&t=1361s) Public Preview Timeline, Open Source Progress, and Q&A

Wrapping up the presentation, the speakers outline the roadmap for the WSL containers release and invite the community to test the tools against their everyday engineering tasks. Updates and release announcements will be published directly to the Windows Command Line blog as features go live. The team is explicitly seeking community engagement and hands-on validation, urging developers to put the software through its paces in real-world environments to help shape ongoing improvements.

The presenters target late June for the formal public preview milestone. As the project develops in the open, users are encouraged to follow development milestones, inspect the code, and file feedback within the public repository under the Microsoft organization on GitHub:

> “And we plan to thank you public preview by the end of June.”

At the conclusion of the session, the presenters open the floor for an in-person question-and-answer period, joined by the development lead for DreamWorks' MoonRay rendering engine to field specialized technical questions about their collaboration and real-time graphics container workflows on WSL.

- **Public Preview Launch**: Slated to arrive by the end of June. - **Blog & Updates**: New milestones and release notes will be shared via the Windows Command Line blog. - **Open Source Tracking**: Progress, issue tracking, and contributions continue at `microsoft/WSL` on GitHub. - **Live Q&A**: Follow-up discussion featuring the WSL engineering team alongside the MoonRay development lead.

## Notable quotes > [21:42](https://www.youtube.com/watch?v=i0M13ZvL04M&t=1302s) Microsoft provides the entire stack for Linux, so it's a single vendor, full supply chain attestation from build to deployment.

## Mentioned Craig Loewen, Pooja Trivedi, Windows Subsystem for Linux, wslc, Microsoft Intune, Microsoft Defender for Endpoint, Debian, PowerShell, PyTorch, Triton, CUDA, Jupyter Notebook, Hugging Face, Docker, Podman, Rancher Desktop, MoonRay, DreamWorks, WSLCSDK, Visual Studio, Moby, Hyper-V, Virtio-FS, Azure Linux 3.0, Azure Kubernetes Service

## Video description Learn about the new core end to end improvements to Windows Subsystem for Linux and the new Container CLI and Apis for your applications

Seating for this session is first-come, first-served. Add it to your schedule to plan your day and arrive early to secure a spot.

To learn more, please check out these resources: * https://aka.ms/build26/DEM346

𝗦𝗽𝗲𝗮𝗸𝗲𝗿𝘀: * Craig Loewen * Pooja Trivedi

𝗦𝗲𝘀𝘀𝗶𝗼𝗻 𝗜𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻: This is one of many sessions from the Microsoft Build 2026 event. View even more sessions on-demand and learn about Microsoft Build at https://build.microsoft.com

DEM346 | Windows

Demo | (400) Expert

#MSBuild

Chapters: 0:00 - Three key takeaways: local Linux containers, built into WSL, enterprise-ready 00:01:33 - WSL update provides full WSL Containers without extra installs 00:03:54 - Simple container workflow demonstration complete 00:09:07 - Transition Back to Slides: Summary of WSL Containers Interaction 00:11:56 - Introduction to Moonray rendering engine collaboration 00:14:02 - Explanation of transparent VM and API-based container management 00:17:26 - Overview of WSL containers architecture: Windows host and VM components 00:19:42 - Details on storage separation using VHD per application 00:23:02 - Closing remarks: public preview announcement and feedback invitation

[Source](https://www.youtube.com/watch?v=i0M13ZvL04M)

Reading summary

Microsoft is introducing native Linux container execution directly within the Windows Subsystem for Linux (WSL), providing an interactive command-line interface and programmatic APIs designed to integrate with Windows enterprise management tools without requiring third-party runtime installs. Unified Engine via CLI and SDK (0:01) WSL containers are delivered as an integral update to WSL rather than a standalone product. The runtime offers two primary access mechanisms funneling into the same underlying virtual machine engine: an interactive CLI binary named `wslc` (aliased to `container`) and an upcoming programmatic NuGet package (`WSLCSDK`) for Windows client applications. Pooja Trivedi demonstrated that `wslc` adopts standard container commands like `run`, `ps -a`, `attach`, and `build` using familiar `Containerfile` specifications. In addition, around 168 GNU Coreutils have been ported directly to Windows, enabling utilities like `grep` inside PowerShell pipelines. Architectural Isolation and Hyper-V Sockets (14:02) Rather than routing all containers through a single shared virtual environment, WSL provisions dedicated utility VMs per client application as well as a separate VM for the `wslc` CLI flow. This architecture isolates container names, networks, and storage namespaces across different programs. Communication between the host `wslservice.exe` and the guest Moby container engine bypasses standard network adapters by utilizing point-to-point Hyper-V sockets (`AF_HYPERV`). For local development with Visual Studio, developers can integrate the SDK into `.csproj` files to trigger automatic image compilation and container orchestration during standard F5 debugging cycles. Storage Subsystems, Virtio-FS, and Hardware Passthrough (7:07) Storage is segregated between internal container data and host-mounted folders. Moby's internal writable layers are isolated in dedicated `.vhdx` virtual hard disks for each application. When mounting host paths into containers, the runtime leverages the Virtio-FS (`virtiofs`) protocol instead of Plan 9 (9P). Trivedi stated that Virtio-FS currently operates roughly twice as fast as Plan 9 when translating semantics between Windows and Linux filesystems. For hardware-accelerated workloads, including PyTorch fine-tuning and Triton kernel compilation, passing the `--gpus all` flag exposes physical host GPU compute directly to the Linux container alongside mounted Windows cache directories. Enterprise Isolation and Cross-Platform Integration (10:58) Craig Loewen highlighted that the architecture maintains enterprise visibility through security suites such as Microsoft Intune and Microsoft Defender for Endpoint. A demonstration featuring DreamWorks' Linux-only Moonray rendering engine showed a Windows command prompt calling `moonray.exe` with Windows backslash paths; the tool launches an ephemeral WSL container VM to render image files on the CPU and terminates instantly upon completion. Additionally, granular directory mounting allows developers to restrict file access to sandboxed directories, minimizing the blast radius of potentially destructive or experimental code. Microsoft aims to release a public preview of WSL containers by the end of June, supported by open-source updates on GitHub and the Windows Command Line blog. Microsoft also plans to deliver a dedicated, container-optimized WSL distribution of Azure Linux 3.0, expanding its single-vendor supply chain attestation model from Azure infrastructure directly onto local Windows workstations.

Source quotes

[21:42] Microsoft provides the entire stack for Linux, so it's a single vendor, full supply chain attestation from build to deployment.

Original transcript

[0:01] Hey everyone, I'm Pooja Trivedi. [0:03] I'm an architect leading developer experiences in AI for Linux [0:07] on Windows, and I'm joined here today by. [0:11] Hi, my name is Craig. [0:12] I'm a product manager working on the Windows Subsystem for [0:15] Linux and other awesome AI tools on Windows. [0:18] And today we're going to be talking to you about [0:21] a new feature, WSL containers. [0:22] And so really the talk boils down to just these [0:25] three points. [0:25] So this is the only really three takeaways you need. [0:28] The first is you're going to be able to run [0:30] Linux containers locally on Windows. [0:32] That includes running them directly part of ACLI or running [0:36] them as part of an API with within Windows applications. [0:40] Second is that it's going to be part of the [0:42] Windows Subsystem for Linux. [0:44] So this will just be a new feature that you [0:46] get directly as part of WSL. [0:48] No need to install something new. [0:49] It will just be part of an existing package that [0:51] I hope you're already using. [0:53] And the third is that we're want to make this [0:56] enterprise ready. [0:57] So this means that all the industry standard tools that [1:00] you're using like MDE, Intune and more, all of that [1:03] will just work with WSL containers as well so that [1:06] you can feel secure and safe using this inside of [1:08] your enterprise environment. [1:11] And I think really the fun part here is let's [1:15] go and jump out of the slides and jump into [1:18] a live demo of taking a look at the CLI. [1:22] So if we could switch to the other machine, we'll [1:25] take a look. [1:33] All right, as Craig said, when we ship this, you [1:36] will get the full capabilities of WSL containers via simple [1:40] WSL update. [1:41] You don't need to download any third party tools, no [1:45] starting of daemons, no Faustian rituals. [1:48] And what it comes with is a command line tool [1:52] called. [1:53] You can't switch, can't switch. [1:56] Oh, great. [1:57] Oh, it's switched OK. [1:58] Nice. [2:03] What it comes with is a command line tool called [2:06] WSLC and here I wanted to show you the command [2:10] reference that the tool exposes. [2:13] And as you look at this you'll realise that it [2:15] looks very familiar to you. [2:16] If you're used to using any of the standard Linux [2:19] container tools out there. [2:20] All the sub commands, options, switches within these also track [2:24] very closely. [2:25] We've also internally aliased it to container, so if you're [2:29] more familiar to using container you can use that binary. [2:35] Let me start by showing you a really simple flow [2:37] here. [2:38] I'm going to start by showing you how to create [2:42] a Debian Linux container on Windows. [2:47] And if you're not familiar, the Dash IT switch here [2:50] tells WSLC to give me an interactive shell into my [2:53] Debian Linux container. [2:56] Normally it would download this image for me from a [2:58] public registry. [2:59] If I don't have it here, we have some Internet [3:01] issues here. [3:02] So I pre downloaded it. [3:04] And so I'm inside of the shell of the Debian [3:07] Linux container. [3:08] I can detach out of it using the standard control [3:11] P control Q sequence. [3:13] And now if I do a WSLC PS-A or if [3:16] I do a WSLC container list if that's more familiar [3:21] container. [3:23] List. [3:24] Container list. [3:27] You'll see that the DBN Linux container started about 40 [3:29] seconds ago. [3:31] I'm going to attach back to my container using WSLC [3:35] attach and the container ID or the container name and [3:39] there it is, I'm back inside of DBN Linux. [3:43] I'm going to exit out of this container and terminate [3:46] it, and WSLC PS-A will now show me that the [3:49] DBN Linux container is exited about four seconds ago. [3:54] So this was a really simple flow. [3:56] Next, I want to show you how you would build [3:59] custom images using WSLC. [4:01] You would want to use this when you want to [4:04] bring your cloud workloads or your production workloads directly onto [4:07] your primary Windows development box so that you can iterate [4:11] on it, test it, debug it locally. [4:13] And that way, because it's packaged as a container, you [4:16] get the same environment that you have in production locally [4:19] on your box here. [4:19] And so you don't have the gotcha as of it [4:21] works in dev, doesn't work in prod. [4:24] So let me start by showing you a container file. [4:28] If you're not familiar with this file, the container file [4:31] has all the ingredients and the recipe that you need [4:34] in order to build your container images. [4:36] So it packages up your environment, your dependencies, your application [4:41] logic, the instructions on how to run your application into [4:44] a file, and then you can use this to build [4:47] a container image. [4:48] For me here, it's a really simple Linux utility I [4:51] wrote for fun, which allows me to run all of [4:54] my favorite Linux inspection commands on any file I drop [4:58] to it. [4:59] So the first line here is basically saying that my [5:03] container environment starts with a very simple lightweight Python 312 [5:08] image. [5:09] The next few lines here are installing all the dependencies [5:12] that are needed for my container and my application logic [5:15] to run successfully. [5:17] Here I'm copying my application logic into the container and [5:20] it's a web server that listens on port 5000. [5:23] So I want to expose that port out of my [5:25] container and map it onto my windows box when I [5:28] run this container so that I can interact with this [5:31] web server that's running inside of the Linux container locally [5:34] from my windows box using local host. [5:37] And then the last line here is the instructions on [5:39] how my application should be started within this environment. [5:43] So let me build this image using WSLC build. [5:47] I'm going to call it my Linux spy and I [5:52] can use the container file to build this. [5:57] There it goes. [5:58] And now if I do a WSLC images, and yes [6:01] you can use grip here on PowerShell because I'm going [6:05] to do a shameless plug here for another friend of [6:08] mine. [6:09] We have imported all the core utils, about 168 Linux [6:12] utils into Windows now which are fully integrated. [6:17] So here's the image that just built it says 9 [6:20] hours ago because some of the caching for base layers [6:24] was already used. [6:25] I'm going to now start a container using this image [6:28] and I'm going to do a port mapping. [6:31] As I mentioned earlier, my container web server listens on [6:34] port 5000. [6:35] I'm going to map it to my Windows host using [6:38] this Dash P switch. [6:41] And here I'm starting up my container. [6:43] There it goes. [6:44] I can now hit it on 127001, which is local [6:48] host and I can interact with my Linux by my [6:52] forensics tool. [6:53] Here and there it is. [6:54] It runs all of my favorite Linux commands on it. [6:58] So now that I've shown you how you would expose [7:01] services out of a Linux container onto your Windows host, [7:04] I wanted to show you something more interesting. [7:07] I wanted to show you how these containers can actually [7:10] tap into the GPU that's present on your Windows host [7:13] for your AI scenarios or if you want to run [7:16] graphical applications or whatever. [7:18] Have you. [7:19] I've already built my container and pre warmed it so [7:22] it's already running. [7:25] I did that to save time and I'm going to [7:27] start. [7:28] It's a Jupiter notebook web server again. [7:30] It listens on port 8888, which I exposed out using [7:33] port mapping. [7:34] I'm going to start running these cells while I tell [7:38] you what this cool AI container of mine does. [7:42] What it does is it actually pulls down a G [7:46] PT2 model and then it fine tunes it on the [7:49] GPU on this Windows host and then it torch compiles [7:53] this so that it generates fused Triton kernels. [7:56] Those are those fused Triton kernels are optimised kernels that [8:00] allow my model to run really fast on the GPU. [8:03] And then for your entertainment, it shows you a head [8:07] to head race between a compiled model and its uncompiled [8:10] eager mode counterpart. [8:13] And you can see how fast the compiled model runs. [8:16] And while all this is happening, the GPU on my [8:18] Windows box here is being leveraged to do all of [8:21] this work inside of the Linux container. [8:25] And before I hand it back over to Craig for [8:27] some more WSL containers goodness and how you can embed [8:30] those into your Windows application flows, I quickly wanted to [8:33] show you the command that I ran to start my [8:36] AI container here. [8:38] So I ran it using run Dash IT you're familiar [8:41] with that I showed you earlier. [8:43] There's port mapping. [8:43] And then the Dash V switch here is saying that [8:46] I want to mount volume. [8:47] So I want to mount the HF, the hugging face [8:50] cache directory that's on my Windows host here onto this [8:54] location into my container. [8:56] And then the Dash Dash GPU's. [8:58] All switch is asking the Linux container to use the [9:01] GPU on my Windows box here. [9:03] And I'm going to hand it back to Craig. [9:05] Awesome. [9:07] So if we jump back to the slides, we'll be [9:09] able to see kind of the next step. [9:11] And really the summary of that demo is there's two [9:15] ways to interact with WSL container. [9:18] There's the CLI, which we just showed as an awesome [9:21] way to directly interact with those containers, but we also [9:24] have an API. [9:25] So the CLI is perfect for direct container access, direct [9:28] building, running, and then the API is going to be [9:31] a Nugent package that you'll be able to run. [9:33] And it's basically two different doors for the same engine. [9:36] It's all powered by the same WSLVM that actually powers [9:39] WSL distributions. [9:41] And really, when we talk about this, it begs the [9:44] question, why did we build this? [9:46] Who is this for? [9:47] What are our goals at Microsoft for making this technology? [9:50] And that breaks down to three different customer profiles. [9:53] The first is if you're a container developer, this is [9:56] for you. [9:56] If you like to build, use containers. [9:59] We wanted to make it easier to get started with [10:01] to use containers and have that all run seamlessly on [10:04] Windows. [10:05] We also wanted to be able to be opinionated about [10:08] our approach. [10:09] We know that we are building both an API and [10:11] ACLI, so we want them to work together, and we're [10:13] probably going to write some pretty custom commands to do [10:16] that. [10:17] That's why we built our own Linux container CLI as [10:19] opposed to using other standard tools like Docker or Podman [10:22] or Rancher Desktop. [10:23] However, those tools all work great, and if they still [10:26] solve problems for you, you should use them. [10:28] This is just another approach, and by nature of this [10:31] work, this is fully open sourced. [10:34] It's fully open sourced on WSL and all of the [10:36] code that we're doing, all the improvements that we're doing [10:39] to the underlying VM technology are going to accrue to [10:41] those other container technologies as well. [10:44] So for example, we're improving the cross OS file performance. [10:47] You'll get that as well on Docker Desktop, Rancher Desktop, [10:50] Padman Desktop, as well as on the Linux container CLI [10:53] inside of WSL. [10:55] Secondly, we're also wanting to build this for app builders [10:58] and IS VS. [10:59] We want you to be able to take some awesome [11:01] Linux code that you have lying around or in the [11:04] cloud and run that directly and locally as part of [11:07] a Windows application. [11:08] We want you to be able to do that all [11:10] using really standard and powerful AP is in your Windows [11:13] app. [11:14] And lastly, we all started building this for enterprise IT [11:17] admins. [11:17] These are folks who, hey, I want to run open [11:20] Claw inside of my enterprise and I want to run [11:22] that in a containerized environment using Linux, but I want [11:25] to manage that using all the Windows tools like Intune [11:28] or MDE that I'm familiar with. [11:31] We're building this exactly for scenarios like that where I [11:34] want to be able to use these powerful tools and [11:36] applications and run Linux on Windows. [11:38] And I don't want to be afraid of, hey, there's [11:41] a black box opaque VM running in my organization. [11:44] How do I access that? [11:45] I want to make sure that you get that powerful [11:47] isolation without having to worry about your security tools not [11:50] being able to break that boundary. [11:53] And so this brings us to a really awesome plug [11:56] that we wanted to show for one of the partners [11:59] that we've worked with. [12:01] We have worked a lot with the Moonray team. [12:04] Moonray is a very powerful rendering engine that is used [12:08] to render amazing movies like the bad guys two or [12:11] the wild Robot, which I'm a big fan of personally. [12:14] And that rendering engine is built entirely on Linux. [12:18] And so we've been able to work with the Moonray [12:21] team to say, hey, how could we make it easier [12:23] to get started with Moonray, which is also an open [12:26] source application, and be able to use that on Windows. [12:30] So that brings us to our second demo of let's [12:33] go ahead and run the API portion of WSL containers. [12:36] So I'm going to flip over here and you can [12:39] see I'm in this project and I'm about to go [12:43] run moonray.exe, which is a build that I've created. [12:47] So again, this is a full Linux based rendering engine, [12:50] but I have an EXE on my system and then [12:53] I've given it some files. [12:54] Of course it's backslashes. [12:56] So we're running this in Windows and I've given it [12:59] some input RDLB which are just render input files. [13:02] And then I'm saying please output this jpg for me [13:04] and I'm going to open up task manager so we [13:07] can take a look at what's happening while we run [13:09] this. [13:10] When I run it, I've left some debug info here, [13:13] it's starting up a session for me. [13:15] That's how quickly it started the container. [13:17] And then now it's doing the full render. [13:19] And so if I look at my CPU, all the [13:21] renders happening on my CPU, it's happening directly inside of [13:25] this Moonray VM right here. [13:27] And then now that the render is complete, the Moonray [13:30] VM shuts down and all of that gets released back [13:33] to Windows. [13:34] So it's totally seamless. [13:35] If I did not include these debug messages, it would [13:37] just look like a Windows app. [13:39] I would actually be none the wiser that this was [13:41] running Linux in the back end. [13:43] And then the cool part is if we take a [13:45] look at the output, you can see it outputted that [13:47] JPEG for me right here, which is a wonderful orange [13:50] coffee maker showing some of the cool rendering of, you [13:53] know, see through ray tracing applications. [13:56] There. [13:56] So this VM creation in the background, all of this [13:59] running is all completely transparent to the to the user [14:02] of the API. [14:02] All you're doing is you're creating and managing containers via [14:05] the API. [14:06] Exactly so you as the developer can have control. [14:08] Hey, I want some Linux code but I don't want [14:10] my users to every worry am I running Linux or [14:12] Windows. [14:13] It just should all just work. [14:15] So let's take a look at a sample project that's [14:17] related to see how this might look in a code [14:20] perspective. [14:21] I have some container or some Nugent packages. [14:24] I added this containers package and then I've defined this [14:28] item group here saying please build this container for me. [14:32] You can find the container file here and output it [14:35] here. [14:36] And if you take a look on my left hand [14:38] navigation, that container file is directly with all of the [14:41] source code of my app. [14:43] It's built into my application. [14:45] So this is all a part of your CS project [14:47] file, so that container file as well. [14:49] So it's all integrated together as a single experience, even [14:52] though and. [14:53] When I build and run this, it will automatically build [14:55] the container for me. [14:56] So 1F5 experience and it's going to run my sample [15:00] app in this case. [15:01] This app is a fake and very whimsical app that [15:04] I built. [15:05] I wanted to build an AI agent that would run [15:09] stocks for me. [15:10] So it's going to buy and sell some fake stocks, [15:12] and that's the container starting up. [15:14] It's starting a bunch of processes and services in the [15:17] background, and then now it's started my stock trading. [15:20] And so I've hired an AI agent I called Herbert [15:23] to buy and sell some stocks. [15:26] And what actually is happening is I've given this container [15:29] its own desktop and I've given it a visualization of [15:31] the desktop so we can see what's happening. [15:34] And we can see the AI agent actually goes in [15:37] and make some fake stock trades, but he has a [15:40] really bad habit of eating files. [15:43] So yes, I actually did program this to go randomly [15:46] delete files on my system. [15:48] And when it deletes the file, it really deletes it [15:51] on Windows. [15:52] So that actually deleted the file here. [15:54] And what we're highlighting is that there is a high [15:58] level of integration between the container and Windows. [16:01] You can specify, I want these ports open. [16:04] That's how I viewed that desktop that I showed. [16:07] And you can specify, I only wanted to access this [16:10] file on Windows. [16:12] So I minimize the blast radius. [16:14] Even though it really was deleting random things. [16:17] I'm OK with showing that on this demo machine because [16:20] it could not physically delete all the files on Windows. [16:23] It could only delete the files in this C temp [16:26] Herbert folder. [16:27] So that's a very quick overview of where we're going [16:31] with the API. [16:33] And I'm sure the next burning question that you must [16:35] have is how does this all work? [16:36] So Pooja, would you be able to explain some of [16:38] the architecture? [16:39] Yeah, sure. [16:41] So the way this works is every Windows application intending [16:46] to create Linux containers gets a lightweight utility VM that's [16:51] dedicated to it that's created in the background. [16:55] All of the applications Linux containers are Co located on [16:59] this VM. [17:00] Every application as well as the CLI flow gets a [17:02] separate VM. [17:03] And what this gives us is a hypervisor boundary per [17:07] app and it also gives us resource separation and a [17:11] way to not 'cause conflict. [17:13] So all of a container, all of an application's containers, [17:17] it's names, it's volume, volume names, networks are all isolated [17:22] on a on AVM basis. [17:23] So there is no conflict there. [17:26] Going into a little bit more detail on the left, [17:29] here you see the Windows operating system and on the [17:32] right is a virtual machine that was either created by [17:35] a Windows application by calling into the WSL containers API [17:38] or the CLI flow. [17:40] So as we mentioned, the two entry points into the [17:44] WSL containers world are via the API, which is exposed [17:48] by a library called WSLCSDK. [17:51] We publish it via Nugent package that Windows applications can [17:54] include and then start interacting with the WSL containers API [17:57] to create and manage containers. [18:00] Or the other entry point into this world is the [18:03] WSLC command line executable or container executable that I demoed [18:07] earlier. [18:09] Both of these talk to WSL service via inter process [18:12] communication. [18:13] If you've used WSLWSL, service exists today in that world [18:19] it is used. [18:20] Its job is to manage the distros that WSL runs, [18:22] the life cycle of the WSL virtual machine, and the [18:25] communication between the VM and the host. [18:28] We've augmented the same service to now manage the containers [18:32] that run within these VMS, and it also manages and [18:35] relays information back and forth between these containers and the [18:39] users. [18:40] On the Windows host side, inside of the Linux virtual [18:42] machine we run a container runtime. [18:45] Today we're on Mobi. [18:46] It's an open source engine that powers Docker today and [18:50] WSL service uses an HV socket to communicate users intent [18:54] to the container runtime by opening this HV socket with [18:57] the Linux virtual machine. [19:00] It is not a network socket, it's a specialized socket [19:02] that is used specifically for communication between the VM and [19:06] the hypervisor. [19:07] It's an it's a special extension of the Winsock API [19:11] and every VM has. [19:12] It's sort of like a point to point per VM [19:14] to the hypervisor. [19:15] So it's an isolated communication channel for every VM, and [19:19] once the user issues a command for container creation, the [19:23] container runtime goes ahead and creates those containers, and WSL [19:27] service does the job of relaying that information back and [19:31] forth. [19:31] Sorry, oops, excuse me. [19:40] So that's that. [19:42] Next, I wanted to quickly touch on storage. [19:46] So the container runtime inside of every virtual machine uses [19:50] a central directory within this VM to store container related [19:54] information. [19:54] It's metadata, it's scratch space, etcetera. [19:58] And usually it's a location like Viralib and the container [20:01] storage location. [20:02] What we do is we now map this location onto [20:06] a virtual disk on the Windows host side or a [20:09] VHD. [20:11] And every application gets its own VHD as well. [20:14] The CLI flow also gets its own VHD. [20:16] So at the storage level everything is separated per application [20:19] as well. [20:22] And lastly, I quickly wanted to show you what the [20:24] flow would look like when a command as shown above [20:27] is run. [20:27] The run dash IT I've already talked about before. [20:30] The volume mount here is saying that I want to [20:34] map my C: data directory on the Windows side onto [20:38] the slash data mount on the Linux container side. [20:42] And I want to create a Debian latest container. [20:44] So when this is issued, the container runtime creates that [20:48] Debian latest container and then it attaches a slash data [20:52] volume onto this container. [20:54] And then under the hood we go ahead and map [20:58] the slash data folder or volume onto the SQL and [21:02] data folder on the Windows side using Verdio FS. [21:06] Vario FS is a relatively new file sharing protocol that [21:11] is used for sharing files between VM and hypervisor. [21:15] And for us we have this added complexity here of [21:18] translating all of the file system semantics between 2 completely [21:21] different operating systems. [21:23] If you've used WSL, it uses Plan 9 today. [21:27] Vario FS is about twice as fast as it stands [21:31] today in this environment. [21:33] And we're investing more in this areas and looking at [21:36] various alternatives as well to make this even faster. [21:42] And before we wrap up WSL containers here, I wanted [21:46] to also quickly take a detour and mention what else [21:50] is new for WSL. [21:52] Microsoft's Linux distro, Azure Linux 4 dot O is now [21:55] available for general use, so that's exciting. [21:58] It is the same distro that runs AKS today. [22:02] This is what powers Azure. [22:03] So if you use this, it gives you a consistent, [22:06] battle tested, proven environment. [22:10] It Microsoft provides the entire stack for Linux, so it's [22:14] a single vendor, full supply chain attestation from build to [22:18] deployment. [22:19] So you know where to go if you have issues. [22:22] It's available today for VM, so you can try that [22:25] out. [22:26] And the WSL distro is coming out soon as well. [22:28] So once that comes out, we would love for you [22:31] to try that out as one of the distros for [22:33] WSL. [22:33] It is container optimized. [22:35] It is lightweight. [22:37] So please try it out and let us let us [22:38] know what you think. [22:41] And that's it for WSL containers. [22:43] We will be posting on the CLI blog when this [22:46] goes live. [22:48] Please try this out with your real world scenarios. [22:51] Let us know, give us feedback so we can improve. [22:54] And we plan to thank you public preview by the [22:56] end of June. [22:57] So you will be able to try it out there. [22:59] We're open source, so you can go check our progress [23:01] at Microsoft WSL. [23:02] And then we'll be here for questions as well as [23:04] the dev lead for Moon Ray. [23:06] We'll be here as well if you have questions. [23:07] So thank you very much. [23:08] Thank you all. [23:09] Thank. [23:09] You so much.