{"id":28509523,"url":"https://github.com/srl-labs/wsl-containerlab","last_synced_at":"2026-04-28T02:00:56.489Z","repository":{"id":265886294,"uuid":"896803104","full_name":"srl-labs/wsl-containerlab","owner":"srl-labs","description":"A ready-to-use WSL distribution that makes network labbing on Windows a breeze","archived":false,"fork":false,"pushed_at":"2026-03-25T00:03:20.000Z","size":504,"stargazers_count":38,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-04-13T09:03:06.215Z","etag":null,"topics":["containerlab","containers","docker","network-automation","networking","wsl2"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srl-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-01T10:57:01.000Z","updated_at":"2026-04-07T03:16:09.000Z","dependencies_parsed_at":"2025-02-03T12:26:55.694Z","dependency_job_id":"aecad065-6cc0-4f18-a7b9-c0536fae3c0a","html_url":"https://github.com/srl-labs/wsl-containerlab","commit_stats":null,"previous_names":["kaelemc/wsl-clab","srl-labs/wsl-containerlab"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/srl-labs/wsl-containerlab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fwsl-containerlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fwsl-containerlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fwsl-containerlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fwsl-containerlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srl-labs","download_url":"https://codeload.github.com/srl-labs/wsl-containerlab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fwsl-containerlab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32362782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containerlab","containers","docker","network-automation","networking","wsl2"],"created_at":"2025-06-08T22:08:56.389Z","updated_at":"2026-04-28T02:00:56.455Z","avatar_url":"https://github.com/srl-labs.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Containerlab WSL\n\nA WSL distribution designed for easy 'plug and play' usage with [Containerlab](https://containerlab.dev).\n\n|   OS       | Supported   | VM-based NOSes |\n| :--------: | :---------: | :------------: |\n| Windows 10 | Yes         | No             |\n| Windows 11 | Yes         | Yes            |\n\nWe recommend using Windows Terminal for the best experience:\n- Windows 11 users: Windows Terminal is installed by default.\n- Windows 10 users: Download Windows Terminal from the [Microsoft Store](https://aka.ms/terminal).\n\n# Quick Start\n\n**Ensure you are on the latest version of WSL (WSL2.4.4 or newer). Use `wsl --update`.**\n\n- Download the `.wsl` file from the [releases page](https://github.com/kaelemc/wsl-clab/releases/latest).\n- Double click the `.wsl` file to install.\n- Open 'Containerlab' from the start menu, or execute `wsl -d Containerlab`\n- Complete the interactive shell selection.\n- If you are behind a proxy, the OOBE script will let you configure it using [proxyman](https://github.com/FloSch62/proxyman).\n- If you have Docker Desktop installed. See [Docker Desktop](#docker-desktop).\n- Done! you can start labbing. (see [DevPod](#devpod) for a great way to lab).\n\n\u003e [!NOTE]\n\u003e Default credentials are `clab:clab`\n\n# WSL Installation\n\nThis distro makes use of WSL2, which requires that virtualization is enabled in\nyour UEFI/BIOS. \n\nThis may appear as something called 'SVM (AMD-V)' or 'Intel VT-x' depending on\nyour processor.\n\n### Windows 11\n\nOpen PowerShell and type:\n\n```powershell\nwsl --install\n```\n\nRestart your PC, and WSL2 should be installed.\n\n### Windows 10\n\n\u003e [!TIP]\n\u003e Newer versions of Windows 10 allow usage of `wsl --install`, just like with Windows 11.\n\n**Instructions are from ['Manual installation steps for older versions of WSL'.](https://learn.microsoft.com/en-us/windows/wsl/install-manual)**\n\nOpen an elevated PowerShell window (as administrator) and paste the following two commands:\n\n```powershell\ndism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart\n\ndism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart\n```\n\nAt this point restart your computer. After it has rebooted download the latest\nWSL2 kernel. [Download link](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi).\n\nFollow the installation wizard. After completion finally set WSL2 as the default\nversion of WSL.\n\nIn PowerShell or command prompt paste the following:\n\n```powershell\nwsl --set-default-version 2\n```\n\n## Version Check\n\nRun `wsl --version` in PowerShell or command prompt to ensure WSL2 is enabled.\nThe WSL version number should be 2.4.4.0 or higher.\n\n```powershell\nPS C:\\Users\\Kaelem\u003e wsl --version\nWSL version: 2.4.4.0\nKernel version: 5.15.167.4-1\nWSLg version: 1.0.65\nMSRDC version: 1.2.5620\nDirect3D version: 1.611.1-81528511\nDXCore version: 10.0.26100.1-240331-1435.ge-release\nWindows version: 10.0.19044.5131\n```\n\n# Distro Installation\n\n**Ensure WSL is enabled and you have WSL 2.4.4 or newer. See the\n[version check](#version-check) instructions.**\n\n\n1. Download the `.wsl` file from the [latest release](https://github.com/kaelemc/wsl-clab/releases/latest).\n\n2. Double click the `.wsl` file to install the distribution.\n\n\u003e [!NOTE]\n\u003e If you see an error that nested virtualization is not supported, see the\n\u003e [vrnetlab](#vrnetlab-nested-virtualization) section below.\n\n3. From the start menu you can launch the distribution from a new 'Containerlab'\n   shortcut which has been added.\n\n    or in PowerShell/cmd you can execute:\n\n    ```powershell\n    wsl -d Containerlab\n    ```\n\n4. On first launch you will be presented with an interactive menu to select what\n   shell and prompt you would like. \n\n    This menu will give you options of `zsh`, `bash` (with a fancy two-line prompt)\n    or `bash` with the default prompt.\n\n    You will also be presented with the choice to have the Fira Code\n    [nerd font](https://www.nerdfonts.com/font-downloads) automatically installed on\n    your system. **We recommend you install this font (especially if using `zsh` as\n    your shell of choice).**\n\n    Finally at the end SSH keys will be copied from your Windows host into\n    Containerlab WSL to enable passwordless SSH. This is an integral step for\n    [DevPod](#devpod) usage.\n\n    If no SSH keys are found on your machine, an RSA keypair will be automatically\n    generated.\n\n    To run the setup again, execute `/etc/oobe.sh` inside Containerlab WSL.\n\n\u003e [!IMPORTANT]\n\u003e After installation, close and reopen Windows Terminal to ensure \n\u003e proper font rendering and appearance settings have been applied \n\u003e correctly. \n\u003e \n\u003e This step is necessary for the terminal to recognize and use the\n\u003e newly installed WSL distribution's display configurations.\n\n5. You can open Containerlab WSL in the following ways:\n\n    - From the profile in Windows Terminal (recommended).\n    - From the shortcut in the start menu.\n    - Executing `wsl -d Containerlab` in PowerShell or command prompt.\n\n\u003e [!NOTE]\n\u003e Opening WSL via the shortcut or `wsl -d Containerlab` will not\n\u003e open in our custom Windows Terminal profile. The customised\n\u003e appearance settings will not be functional in this case.\n\n# vrnetlab (Nested virtualization)\n\n\u003e [!IMPORTANT]\n\u003e This feature is only supported on Windows 11.\n\nYou can run [vrnetlab (VM-based)](https://github.com/srl-labs/vrnetlab) nodes on\ntop of WSL2 and use them in containerlab. Containerlab WSL is already configured\nso that nested virtualization is enabled on the distro side.\n\nTo use vrnetlab nodes on Containerlab WSL you must \u003cu\u003eensure that nested\nvirtualization is enabled globally in WSL\u003c/u\u003e. \n\n- You can do this by opening the *'WSL Settings'* app, going to the *'Optional\nfeatures'* tab and ensuring *'Enable nested virtualization'* is enabled.\n  \n\u003e [!NOTE]\n\u003e You should be good to go if you don't get any errors during installation or\n\u003e distro bootup saying that *'Nested virtualization is not supported on this\n\u003e machine.'*\n\nSee the [containerlab user manual](https://containerlab.dev/manual/vrnetlab/)\nfor more information about vrnetlab.\n\n# Performance Tuning\n\nWSL2 runs as a VM. By default allocated resources are:\n\n| Resource | Default value        | Description |\n| :------: | -------------------- | :---------- |\n| vCPU     | Logical thread count | If your processor has 8 cores and 16 threads, WSL2 will assign 16 threads to the WSL VM. |\n| RAM      | 50% of system memory | If you have 32Gb of RAM on your system, WSL will allocate 16Gb to the WSL VM. |\n| Disk     | 1Tb                  | Regardless of disk size, the WSL VM will have a VHD with a maximum size of 1Tb. The disk is thin/sparse provisioned. |\n\nDespite the fairly generous resource allocation by default. WSL2 will not use\n100% of the assigned resources.\n\n# Docker Desktop\n\nIf you have Docker desktop installed. You **must** ensure the integration with\nthe Containerlab WSL distro is disabled, otherwise Containerlab will not work\ninside Containerlab WSL.\n\n1. Open Docker Desktop window and go to settings (gear icon on the title bar)\n1. Under the 'Resources tab, enter the 'WSL integration' page\n1. Ensure 'Containerlab' has integration disabled\n\n![Docker Desktop integration screenshot](./images/docker_desktop_integration.png)\n\n# DevPod\n\n[DevPod](https://devpod.sh/) is an awesome tool which can let us easily run labs\nwhich take advantage of Devcontainers, which overall can give a 'one-click' lab\nexperience. It's like running the codespaces labs but on your local machine.\n\nCheck out [this video](https://www.youtube.com/watch?v=ceDrFx2K3jE) for more\ninfo.\n\nContainerlab WSL was designed to support this lab experience out of the box.\nJust remember the following consideration:\n\n- When using DevPod, ensure Containerlab WSL is started (it does **not**\nautomatically launch on Windows startup), you should leave the terminal window\nwith Containerlab WSL open in the background.\n\nA one-time configuration step is required. You must setup a provider in DevPod.\nFor Containerlab WSL, create the **SSH** provider with the following values:\n\n| Field | Value            |\n|-------|------------------|\n| Host  | `clab@localhost` |\n| Port  | `2222`           |\n\nYou can leave the other settings as the default values. See the screenshot\nbelow.\n\nAfter configuring the provider, you are done! You can now use one-click labs you\nsee with the DevPod button, or configure the lab workspaces yourself.\n\n![DevPod settings screenshot](./images/devpod_settings.png)\n\n\u003e [!NOTE]\n\u003e You may have to tick 'Use Builtin Ssh' for correct behaviour.\n\n# Accessing lab nodes\n\nYou probably want to access your nodes from a terminal application your computer, such as SecureCRT, MobaXTerm, PuTTY etc.\n\nThere are two ways you can achieve this:\n- On Windows, add a static route to the lab management network.\n- SSH Tunneling/Proxy (depends on terminal/console application support).\n\n## Adding a static route\n\nYou can add a static route to Windows, where the destination subnet is your labs management subnet, and the next hop is the IP of Containerlab WSL.\n\n### Step 1 - Get the IP Address of Containerlab WSL\n\nIn Containerlab WSL -- Execute and copy/note down the outputted IP address\n```bash\nip addr show eth0 | grep -oP '(?\u003c=inet\\s)\\d+(\\.\\d+){3}'\n```\n\n### Step 2 - Add the route\n\nBy default the Containerlab management subnet is `172.20.20.0/24`. If you have used a custom management subnet in your toplogy, please adjust the below command accordingly.\n\nIn Windows, open an elevated Command Prompt Window (Run as Administrator). Execute the following (replace `\u003cManagement Subnet\u003e`, `\u003cManagement Mask\u003e` and `\u003cWSL IP Address\u003e`)\n```cmd\nroute add \u003cManagement Subnet\u003e MASK \u003cManagement Mask\u003e \u003cWSL IP ADDRESS\u003e\n```\n\nFor example, if using the default management subnet of `172.20.20.0/24`, and the Containerlab WSL IP address was `172.28.121.79`; The command would be:\n```cmd\nroute add 172.20.20.0 MASK 255.255.255.0 172.12.121.79\n```\n\n### Removing the route (Optional)\n\nIf for some reason you need to remove the route, say the subnet or WSL IP address changed, you can execute the following in an elevated Command Prompt window:\n```cmd\nroute delete \u003cManagement Subnet\u003e\n```\n\n## Configuring SSH tunneling (SecureCRT)\n\nIn SecureCRT you can configure SSH tunneling so you can access your lab nodes (running in WSL) without having to modify routes in Windows.\n\n### Step 1 - Configure an SSH session to WSL Containerlab\n\nIn SecureCRT create and save an SSH session to WSL Containerlab. Session parameters are below:\n\n**Session Parameters**\n\n- Hostname: `wsl.localhost`\n- Port: `2222`\n- Username: `clab`\n\nEnsure you save the session.\n\n### Step 2 - Add sessions to your lab nodes\n\nThe only remaining step is when adding lab nodes, ensure you go to the 'Firewall' settings -\u003e 'Select Session' -\u003e Select the saved session to WSL (default name: `wsl.localhost`).\n\nNow you should be able to 'natively' connect to your lab nodes from within Windows.\n\n# Developers\n\nDevelopment should be performed from another WSL distribution.\n\nClone the repository and build using the build script (you may have to\n`chmod +x` the script)\n\n```bash\n./build.sh\n```\n\nThis will place `clab.wsl` in `C:\\temp`. Doubleclick to install the\ndistribution.\n\n## Manual Steps\n\n1. From inside a WSL distro Build the container:\n\n    ```bash\n     docker build . --tag ghcr.io/kaelemc/clab-wsl-debian\n    ```\n\n2. Run it and export the filesystem to a `.wsl` file:\n\n    ```bash\n    docker run -t --name wsl_export ghcr.io/kaelemc/clab-wsl-debian ls /\n    docker export wsl_export \u003e /mnt/c/temp/clab.wsl\n    ```\n\n\u003e [!IMPORTANT]\n\u003e Create the 'temp' directory on your C: drive if it doesn't exist.\n\n3. Remove the container to ease rebuilding:\n\n    ```bash\n    docker rm wsl_export\n    ```\n\n4. Use it\n  \n    In your windows filesystem at `C:\\temp` should be a file `clab.wsl`, double\n    click to install. or use:\n    \n    ```powershell\n    wsl --install --from-file clab.wsl\n    ```\n\n# Uninstallation\n\nUninstall Containerlab WSL using the following command in PowerShell/command\nprompt:\n\n```powershell\nwsl --unregister Containerlab\n```\n\nEnsure uninstallation by checking installed distros:\n\n```powershell\nwsl -l -v\n```\n\n# Reference Material\n\n- https://learn.microsoft.com/en-us/windows/wsl/use-custom-distro#export-the-tar-from-a-container\n- https://learn.microsoft.com/en-us/windows/wsl/build-custom-distro\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrl-labs%2Fwsl-containerlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrl-labs%2Fwsl-containerlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrl-labs%2Fwsl-containerlab/lists"}