BRK395 · Breakout
Inside WSL containers for application development
Speakers: Craig Loewen, Pooja Trivedi
Microsoft’s player cannot open a video at a given time: once it plays, skip to the time shown.
What the session covers
Pooja Trivedi and Craig Loewen cover WSL containers, generally available since the end of September, which make Linux containers a built-in Windows feature with the wslc CLI and an SDK/API. The first part demonstrates the CLI, image builds with GPU-accelerated CUDA and bind mounts, and a Windows app embedding the MoonRay Linux renderer through the SDK. The new material includes Aspire defaulting to WSLC, Intel NPU passthrough, local AKS Kubernetes clusters on WSL (aks-devctl in preview), and live Defender for Endpoint and Intune demos including a container registry allow list. A 400-level architecture section explains wslservice, HV sockets, Moby/containerd, per-VM VHD storage, virtio-fs, and how Intune policies and the eBPF-based MDE sensor operate. The session closes with a roadmap: wslc compose, USB for WSL distros, and anti-malware and quarantine of untrusted containers.
Best for: Developers and endpoint/security admins who need to run or govern Linux containers on managed Windows devices with Intune and Defender for Endpoint.
New material starts at 14:05. Up to 14:05 the session demonstrates the CLI, image builds, the SDK and the basic architecture of the already-GA product; from 14:05 it moves to post-GA partner integrations (MXC, Aspire, Intel NPU passthrough).
Where to skip: If you know WSL containers from Build, skip to 14:05. The local AKS cluster demo at 18:53, the Defender demo at 28:30 and the Intune registry allow list at 30:45 are the practical core; 33:14–40:34 is the 400-level architecture and enforcement internals; the roadmap is at 40:34. The 10:16 SDK demo is worth a look if you build Windows apps.
Chapters (14)
- 00:05 Recap Depth 100 · Novelty 1/3
Welcome and three takeaways: Linux containers first-class on Windows via WSL
Pooja Trivedi and Craig Loewen introduce WSL containers, previewed at Build and generally available since the end of September. The session's three takeaways: Linux containers are a first-class Windows feature with a CLI and an API; they ship inside the Windows Subsystem for Linux with no extra licence or setup; and they are enterprise ready with Intune and Microsoft Defender for Endpoint integration out of the box.
- 01:47 Demo Depth 300 · Novelty 1/3
WSLC CLI basics: run, detach, list and attach a Debian container
Pooja shows that WSL containers need no third-party tools; `wsl --update` brings the CLI and API. The wslc command reference deliberately mirrors existing Linux container tooling to reduce friction. She runs an interactive Debian latest container (Debian 13 Trixie), detaches with Ctrl+P Ctrl+Q, lists containers with `wslc ps -a`, reattaches and exits to show the container lifecycle.
- 04:02 Demo Depth 300 · Novelty 1/3
Building an OCI image and running a GPU-accelerated CUDA container with bind mounts
Pooja walks through a Containerfile for a GPU fractal web app (Debian Trixie Slim base, /app workdir, apt dependencies, port 8090, health check tied to container health) and builds it with `wslc build`. She runs it with `--gpus all`, port mapping 8091:8090 and a read-only bind mount of the Windows source folder to /app, then shows a CUDA Mandelbrot canvas using the laptop's NVIDIA GPU in Task Manager. Craig notes Linux coreutils (about 168 tools like grep) are now available on Windows; further commands cover networks, volumes, and a `container` alias for wslc.
- 10:16 Demo Depth 300 · Novelty 1/3
WSL containers API: Windows app running the MoonRay Linux renderer in a container
Craig shows a Windows desktop app (MoonRay viewer) that reads a coffee maker scene from Windows files while the rendering engine runs entirely in a Linux container started via the WSL container SDK in a few seconds. The process appears in Windows Task Manager and is cleaned up when the app closes. In C# (WslcRenderService.cs) he shows how the SDK is initialised, container settings (image name, init process, scene and output volumes) are set, and the container is started.
- 13:07 Deep dive Depth 300 · Novelty 1/3
Architecture at a glance: one lightweight utility VM per Windows app
Every Windows application that creates Linux containers transparently gets its own lightweight utility Linux VM, and all of that app's containers share it; the CLI path gets its own separate VM. This hypervisor boundary per app enables per-application resource control and isolation, so network and volume names of one app's containers do not conflict with another's.
- 14:05 Demo Depth 200 · Novelty 2/3
Partner integrations: MXC, Aspire defaulting to WSLC, Intel NPU passthrough
Since GA, WSL containers have been integrated with Microsoft execution containers (MXC, demoed in another session) and Aspire, which was the first to switch its Linux container tooling to WSLC by default. Pooja runs an Aspire 'hot takes' app (API, web front end, Postgres, Redis cache, NPU agent) whose Redis and Postgres containers run as WSLC containers. With Intel's driver help, WSL containers can now pass through the Windows NPU; a local Qwen3-8B model on Intel AI Boost generates takes and NPU usage is shown in Task Manager.
- 18:53 Demo Depth 300 · Novelty 2/3
Local AKS Kubernetes clusters on WSL with GPU sharing and an AI embedding arena
Azure Kubernetes Service and WSL power local lightweight Kubernetes clusters on Windows: one CLI command provisions a cluster with a chosen distribution and version, GPU enablement, the NVIDIA device plugin and time-slicing, and a kubeconfig path. The AKS-side CLI aks-devctl is in preview; 'wslc cluster create' is experimental on a public fork and is to be formalised and previewed. kubectl shows a WSL2 node acting as an AKS AI node; an embedding arena app scales from two to four model agents on the GPU. A cloud-edge-device management vision connecting back to Azure is explicitly 'not a roadmap'.
- 26:37 Deep dive Depth 200 · Novelty 1/3
Enterprise questions: security, control and fit with existing tools
Craig moves to the enterprise view and answers three common questions. Security: Microsoft Defender for Endpoint provides threat detection and visibility into what runs in the Linux containers, attributable to the Windows host. Control: Intune offers policy and configuration settings, including access to the feature and a registry allow list. Fit: it uses built-in tools like Intune and Defender for Endpoint, plus a plug-in system for third-party tools.
- 28:30 Demo Depth 300 · Novelty 2/3
Defender for Endpoint demo: WSLC device inventory, alerts, timeline and hunting
In a recorded demo, the Defender portal lists a WSLC machine labelled as WSL2 and linked to its Windows host. Setup requires Microsoft Defender for Endpoint Plan 2 (described as a regular E5 licence) and an MSI plug-in downloaded from Settings > Endpoints; healthcheck.exe verifies it. A potential exfiltration incident in a Linux container is investigated via process details and timeline, and advanced hunting KQL correlates Linux WSL devices with host device IDs.
- 30:45 Demo Depth 300 · Novelty 2/3
Intune demo: WSL container settings and registry allow list enforcement
Craig creates a Windows 10 or later settings catalog policy in Intune end to end in real time; searching 'WSL' shows two categories, Windows Subsystem for Linux settings and Windows Subsystem for Linux container settings. He configures the WSL container setting and an allow list for container registries limited to registry.k8s.io, then assigns and deploys it. On the user's machine a pull from docker.io is blocked by policy while the same image from registry.k8s.io runs, addressing a long-standing request to control which Linux images are used.
- 33:14 Deep dive Depth 400 · Novelty 2/3
Architecture deep dive: wslservice, HV sockets, Moby, per-VM VHD storage and virtio-fs
The API (WSLC SDK.dll, published as a NuGet package) and the CLI both talk via IPC to wslservice.exe, the existing WSL service extended for containers, which creates and manages each utility VM. Host-guest communication uses a per-VM HV socket, an extension of Winsock rather than a network socket; inside the VM a guest agent and the Moby runtime with containerd start containers. Container storage such as /var/lib is mapped to a per-VM VHD on Windows, and bind mounts use virtio-fs, described as two to three times faster than WSL's Plan 9.
- 38:13 Deep dive Depth 400 · Novelty 2/3
How Intune policies and the Defender MDE sensor work inside WSL containers
Intune policies land as Windows registry keys; wslservice reads and translates them and hands them to the container runtime in the Linux VM for enforcement, with nothing running in the VM for Intune. For Defender, the WSL plug-in manager installs a Defender plug-in on the host, which launches an MDE sensor inside the Linux environment; the sensor uses an eBPF-based library to capture process, network and, in advanced cases, file system events, batching telemetry. Future plans include anti-malware/antivirus via MDE and, further out, quarantining untrusted containers.
- 40:34 New Depth 100 · Novelty 2/3
Customers and roadmap: Intel NPU, local Kubernetes, USB for WSL distros, Compose
Craig names customers engaging on WSL and WSL containers: Wells Fargo, Intel, Krones, MOD-Tech, Bolt Graphics and MoonRay. The roadmap sneak peek lists Intel NPU support, local Kubernetes clusters using WSL containers, USB device passthrough to WSL distros, and wslc compose for multi-container apps, the last being further out.
- 41:54 Closing Depth 100 · Novelty 0/3
Wrap-up: WSL containers GA, enterprise integration, related sessions and resources
The speakers recap that WSL containers are generally available, Linux containers are first-class on Windows, and Defender for Endpoint and Intune settings are supported, with partner integrations such as MXC and Aspire. They point to related sessions (BRK421 on AKS fleets, BRK393 on Windows developer tools), WSL documentation, GitHub and developer docs, and ask for feedback.
Announcements (14)
-
MXC integration with WSL containers
Microsoft execution containers (MXC) integrate with WSL containers, demoed in a separate Ignite session.
Speaker’s quote (at 14:33)
„The very first one is MXC. It's the Microsoft execution containers.“
-
Aspire uses WSLC by default
Aspire switched its Linux container tooling to WSL containers by default for distributed apps on Windows.
Speaker’s quote (at 14:33)
„Aspire were the first people to switch out their Linux container tooling to WSLC by default.“
-
Intel NPU passthrough for WSL containers
WSL containers can pass through and use the NPU of the Windows host, similar to GPU passthrough.
Speaker’s quote (at 17:23)
„WSL containers are now able to pass through just like they were able to do for GPU. They're able to pass through and use the NPU“
-
aks-devctl CLI for local AKS clusters on WSL
An AKS CLI that provisions local lightweight Kubernetes clusters on Windows with WSL providing the Linux environment.
Speaker’s quote (at 21:02)
„You can go try out, but then you can use the dev cuddle Which is in preview right now.“
-
wslc cluster create
A WSLC command to create local Kubernetes clusters, currently experimental on a public fork, to be formalised and previewed.
Speaker’s quote (at 21:29)
„the WSLC cluster create is more of an experimental thing. We're going to formalize it and integrate it and preview it soon as well.“
-
Microsoft Defender for Endpoint plug-in for WSL containers
An MSI plug-in that automatically monitors every container a user starts and surfaces it as a WSLC device linked to the Windows host.
Microsoft Defender for Endpoint Plan 2 (E5)
Speaker’s quote (at 29:21)
„you can go to the endpoints under settings and download the plugin. It's just an MSI that you can then deploy to your different machines“
-
Windows Subsystem for Linux container settings in Intune
A new Intune settings catalog category to control WSL containers, including a setting to allow or disable the feature.
Speaker’s quote (at 31:10)
„we've added two wonderful categories. There's the Windows subsystem for Linux settings, And there's also the Windows Subsystem for Linux container settings.“
-
Allowlist for WSL container registries
An Intune setting that restricts from which container registries WSL containers may pull images.
Speaker’s quote (at 31:10)
„And I'm also able to choose an allow list for WSL container registries.“
-
Anti-malware and antivirus in WSL containers via MDE
Planned extension of the MDE sensor in the Linux environment to provide anti-malware and antivirus protection.
Speaker’s quote (at 40:07)
„we are looking in the future at some more advanced scenarios, like we want to bring in anti-malware and anti-virus via MDE into these environments“
-
Quarantining untrusted containers
A future scenario to quarantine WSL containers that are not trusted.
Speaker’s quote (at 40:07)
„more into the future, sometimes we would even look at advanced scenarios like quarantining containers that are not trusted“
-
Intel NPU support for WSL containers
Adds the ability for WSL containers to use Intel NPUs, as shown in the demo.
Speaker’s quote (at 41:00)
„We are doing Intel NPU, so we're adding the ability to use Intel NPU support like what we showed today.“
-
Local Kubernetes clusters using WSL containers
Running local Kubernetes clusters using WSL containers.
Speaker’s quote (at 41:00)
„We're also looking at Kubernetes scenarios, so you will be able to look at running local Kubernetes clusters using WSL container.“
-
USB for WSL distros
Passing USB devices directly to WSL distros for developer workflows.
Speaker’s quote (at 41:00)
„As well, we are adding USB for WSL distro support.“
-
wslc compose
Compose support to define and run multiple containers with wslc compose.
Speaker’s quote (at 41:29)
„we are working heavily on adding compose support. So you will be able to do WSLC compose and run multiple containers.“
Demos (7)
-
A developer runs and manages a Linux container natively from Windows PowerShell using the wslc CLI.
Steps (8)
- Update WSL to the latest version with wsl --update if needed.
- Open Windows Terminal/PowerShell and view the wslc command help.
- Run an interactive Debian latest container with wslc run -it (Debian image).
- Inside the container run cat /etc/os-release to confirm Debian 13 Trixie.
- Detach with Ctrl+P, Ctrl+Q.
- Run wslc ps -a (or wslc container list) to see the container running.
- Attach back to the container, then exit it.
- Run wslc ps -a again to see the container status as exited.
Prerequisites: Latest WSL version (wsl --update); no additional licence required.
-
A developer builds a container image for a CUDA web app and runs it on Windows with NVIDIA GPU access, exposing the app on localhost and using source code from a Windows folder.
Steps (6)
- Write a Containerfile: FROM Debian Trixie Slim, WORKDIR /app, install dependencies via apt-get, COPY the app code, EXPOSE 8090, define a HEALTHCHECK endpoint and the start command.
- Run wslc build to build the image tagged gpu-fractal:demo.
- Run wslc images and grep for the image to confirm it exists.
- Run wslc run with --gpus all, a port mapping of Windows 8091 to container 8090, and a read-only bind mount of the current Windows folder to /app.
- Open the browser at localhost:8091 to load the CUDA Canvas app.
- Zoom into the fractal and watch NVIDIA GPU usage in Task Manager.
Prerequisites: Latest WSL with WSL containers; an NVIDIA GPU on the Windows machine; a Containerfile and application code.
-
An ISV or developer embeds an existing Linux application (the MoonRay renderer) into a Windows desktop app without code changes to the Linux code.
Steps (5)
- Open the Windows app project (moonray.gui) in Visual Studio Code and run it with .NET.
- In the app, select a scene stored on Windows and click Start; the SDK boots a container and creates the rendering engine.
- Orbit the camera to render the scene and check the rendering process in Task Manager.
- Close the app and confirm the container and process are cleaned up.
- In WslcRenderService.cs, initialise the SDK, define container settings (image name, init process, scene and output volume mounts), create the container and start it.
Prerequisites: Latest WSL with WSL containers; a Windows app referencing the WSL containers SDK; a Linux container image of the application.
-
A developer runs a multi-service Aspire application whose Postgres, Redis and NPU agent run as WSL containers, with a local LLM on the Intel NPU.
Steps (6)
- In AppHost.cs define the Aspire app: web app builder, Postgres database, Redis cache, API references, health checks and an NPU agent container for an LLM.
- Start the distributed app with the Aspire CLI.
- Use the wslc CLI to confirm the Redis and Postgres containers run as WSLC containers.
- Open the Aspire Resources dashboard and then the Hot Takes web front end.
- Vote on takes and refresh to see data served from Postgres and then from the Redis cache.
- Use the AI bot to generate new takes with Qwen3-8B on the NPU and check NPU usage in Task Manager.
Prerequisites: Latest WSL with WSL containers; Aspire; a Windows device with an Intel NPU and drivers for the NPU part.
-
A developer provisions a local GPU-enabled Kubernetes cluster on Windows and deploys a multi-agent AI embedding benchmark for inner-loop testing with the same AKS bits as production.
Steps (7)
- Run the cluster create command specifying the Kubernetes distribution and version, --enable-gpu, the NVIDIA device plugin with time-slicing parameters, and the kubeconfig output location.
- Watch the logs showing the WSL provider provisioning an Ubuntu 24.04 WSL2 distribution and Kubernetes components (a couple of minutes).
- Set the context to the generated kubeconfig.
- Run kubectl get pods -A to verify pods including the NVIDIA device plugin are running.
- Run kubectl get nodes to see the WSL2 node.
- Apply the arena.yaml deployment, wait for rollout and set up kubectl port-forward to a local Windows port.
- Open the Embedding Arena in the browser, scale from two to four parallel models and observe GPU usage in Task Manager.
Prerequisites: WSL; the aks-devctl CLI (or the experimental wslc cluster create fork); an NVIDIA GPU for GPU scenarios; kubectl.
-
A security analyst gains visibility into WSL containers on corporate devices and investigates suspicious activity tied back to the Windows host.
Steps (7)
- In the Defender portal open Settings > Endpoints and download the WSL plug-in MSI.
- Deploy the MSI to the enterprise machines.
- On a client run healthcheck.exe from the plug-in folder to verify it is running.
- In Device inventory open the WSLC device and check its WSL2 label and host machine.
- Open Incidents and alerts for the device and review the exfiltration incident, process and PID details.
- Open the Timeline tab to review events.
- In Advanced hunting run a query that maps Linux WSL devices to host device IDs.
Prerequisites: Microsoft Defender for Endpoint Plan 2 licence (regular E5); the WSL Defender plug-in MSI deployed to devices.
-
An IT admin restricts WSL containers on managed devices to an approved container registry and verifies enforcement on an end-user machine.
Steps (8)
- In the Intune admin center go to Devices > Configuration and create a new policy.
- Select Windows 10 and later with a settings catalog profile and name it (e.g. WSL settings).
- Click Add settings, search 'wsl' and open Windows Subsystem for Linux container settings.
- Select the allow WSL container setting and the Allowlist for WSL container registries.
- Enable the allow list and add registry.k8s.io as the allowed registry.
- Assign the policy to users and deploy it.
- On the user machine run a container from the default docker.io and see it blocked by policy.
- Run the same image from registry.k8s.io and see it pull and run.
Prerequisites: Microsoft Intune with Windows devices enrolled; WSL with WSL containers on the devices.