AZ-800 Administering Windows Server Hybrid Core Infrastructure Exam

Eager to master hybrid server management? Discover how to administer Windows Server Hybrid Core Infrastructure on Azure, setting your path towards the Microsoft Certified: Azure Hybrid Infrastructure Administrator Associate certification!

Practice Test

Intermediate
Exam

Configure Windows subsystem for Linux to support containers forrunning Linux

Configure and Integrate WSL2 for Linux Containers

Windows Subsystem for Linux (WSL) lets you run Linux environments directly on Windows without a traditional virtual machine. Upgrading to WSL2 is key because it uses a lightweight virtual machine to provide full Linux kernel compatibility. This upgrade gives you better file system performance and support for complex Linux container workloads. Ensuring your distributions are on WSL2 prepares your system for seamless Linux container operations.

To start, you must enable the WSL feature on your Windows Server. You can do this through PowerShell with the command wsl --install or by turning on Windows Subsystem for Linux in the Windows Features dialog. After enabling, install your preferred Linux distribution from the Microsoft Store or by using wsl --install -d <DistributionName>. Once installed, use wsl --set-version <DistributionName> 2 to upgrade distributions to WSL2 and confirm the version with wsl -l -v.

Next, you need a compatible container runtime to manage and run Linux containers. Popular choices are Docker Desktop and containerd. Installing Docker Desktop involves downloading the installer, enabling the WSL2 integration during setup, and selecting the Linux distributions you want Docker to use. If you prefer containerd, you can install it inside your Linux distribution and configure it with systemd or service definitions to manage containers directly under WSL2.

For optimal performance and stability, it is important to tune resource parameters in the .wslconfig file located in your Windows user directory. Key settings include:

  • memory: Limits the maximum RAM available to WSL2.
  • processors: Controls how many CPU cores WSL2 can use.
  • swap: Defines the size of the swap file for overflow. Fine-tuning these parameters helps balance performance, isolation, and compatibility across different Linux container workloads.

By following these steps—enabling WSL, upgrading to WSL2, installing a container runtime, and adjusting resource allocations—you create a powerful environment for running Linux containers on Windows servers. This integration lets you leverage the best of both Windows and Linux ecosystems, supporting development, testing, and production workloads in a single platform.

Conclusion

In this section, you learned how to prepare Windows Server for Linux containers by enabling WSL, upgrading distributions to WSL2, and installing a suitable container runtime like Docker Desktop or containerd. You also saw how to tune resource parameters in the .wslconfig file to achieve the right mix of performance and isolation. These steps ensure that your server can efficiently host Linux container workloads, making it easier to build, deploy, and manage applications across hybrid environments.