Containerlab is rapidly emerging as a viable solution on macOS, thanks to the increasing availability of ARM64-based NOS container images. The following Containerlab kinds work excellent with macOS on Apple Silicon:

Prerequisites

Steps

  1. Download OrbStack and open it.

  2. Open your favorite terminal emulator.

We will work from the command line for the following steps.

  1. Change to the Documents directory.
cd ~/Documents
  1. Clone the containerlab-orbstack repo from GitHub.
git clone https://github.com/mweisel/containerlab-orbstack.git
  1. Change to the containerlab-orbstack directory.
cd container-orbstack
  1. Create a Python virtual environment for Ansible.
source init_venv.sh
  1. Verify Ansible is installed.
ansible --version
  1. Start OrbStack (if not already started).
orb status || orb start
  1. Create the clab Linux machine.
orb create ubuntu:noble clab
  1. Verify the clab Linux machine is listed and in a running state.
orb list

output:

NAME  STATE    DISTRO  VERSION  ARCH
----  -----    ------  -------  ----
clab  running  ubuntu  noble    arm64
  1. Test Ansible connectivity to the clab Linux machine.
ansible all -m ping

output:

clab@orb | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3.12"
    },
    "changed": false,
    "ping": "pong"
}
  1. Deploy the server.
ansible-playbook server.yml

The automated process should take less than a few minutes to complete.

  1. Verify the installation of the components.
orb -m clab -s 'containerlab version && docker version && gh version && go version'
  1. Deactivate the Python virtual environment.
deactivate

Lab

  1. Log in to the clab Linux machine.
orb -m clab
  1. Change to the srl01 directory.
cd ~/labs/srl01
  1. Deploy the lab.
clab deploy

output:

INFO[0000] Containerlab v0.64.0 started
INFO[0000] Parsing & checking topology file: srl01.clab.yml
INFO[0000] Creating docker network: Name="clab", IPv4Subnet="172.20.20.0/24", IPv6Subnet="3fff:172:20:20::/64", MTU=1500
INFO[0000] Pulling ghcr.io/nokia/srlinux:24.10.2-357-arm64 Docker image
INFO[0031] Done pulling ghcr.io/nokia/srlinux:24.10.2-357-arm64
INFO[0031] Creating lab directory: /home/marc/labs/srl01/clab-srl01
INFO[0031] Creating container: "srl"
INFO[0033] Running postdeploy actions for Nokia SR Linux 'srl' node
INFO[0040] Adding containerlab host entries to /etc/hosts file
INFO[0040] Adding ssh config for containerlab nodes
╭────────────────┬─────────────────────────────────────────┬─────────┬───────────────────╮
│      Name      │                Kind/Image               │  State  │   IPv4/6 Address  │
├────────────────┼─────────────────────────────────────────┼─────────┼───────────────────┤
│ clab-srl01-srl │ nokia_srlinux                           │ running │ 172.20.20.2       │
│                │ ghcr.io/nokia/srlinux:24.10.2-357-arm64 │         │ 3fff:172:20:20::2 │
╰────────────────┴─────────────────────────────────────────┴─────────┴───────────────────╯
  1. Test SSH connectivity to the mgmt0.0 interface of the clab-srl01-srl node.
ssh clab-srl01-srl show version
  1. Destroy the lab.
clab destroy -c