Containerlab is gaining traction on macOS, driven by the growing 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 containerlab-orbstack
  1. Create a Python virtual environment for Ansible.
uv sync
  1. Verify Ansible is installed.
uv run ansible --version
  1. Start OrbStack (if not already started).
orb status || orb start
  1. Create the clab Linux machine.
orb create ubuntu:resolute clab
  1. Verify the clab Linux machine is listed and in a running state.
orb list
  1. Test Ansible connectivity to the clab Linux machine.
uv run ansible all -m ping
  1. Deploy the server.
uv run ansible-playbook server.yml

The automated process should only take a few minutes to complete.

  1. Verify the installation of the components.
orb -m clab -s 'containerlab version && docker version && gh version && go version'

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
  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