Lab & Testing

OcNOS in ContainerLab Part 2: Platform Analysis for Linux, Windows, and macOS

Since publishing the Part 1 ContainerLab guide for Linux, many readers have asked about Mac support, Windows workflows, and hybrid WSL2 setups. This article documents systematic test results across every major platform combination available as of mid-2025 — what works for OcNOS ContainerLab labs, where you’ll hit limitations, and what configuration gets the best results on each platform.

Platform Summary

Platform OcNOS ContainerLab Performance Notes
Linux bare metal ✓ Full support Excellent Native KVM, recommended
Linux VM (VMware/KVM) ✓ Full support Good Enable nested virtualization
Windows WSL2 ✓ Functional Good WSL2 kernel 5.15+, Docker Desktop
macOS + Colima (ARM) ⚠ Limited Slow x86 emulation overhead on Apple Silicon
macOS + Colima (Intel) ✓ Functional Acceptable VirtioFS recommended for bind mounts
macOS Docker Desktop ⚠ Limited Poor Networking constraints limit multi-node

Linux Bare Metal (Recommended)

Native Linux with KVM acceleration delivers the best OcNOS ContainerLab experience. OcNOS containers run at near-native performance, large topologies (8+ nodes) are stable, and ContainerLab’s veth pair networking works without any hypervisor translation layer.

# Linux bare metal -- verify KVM acceleration available
egrep -c '(vmx|svm)' /proc/cpuinfo
# Must be > 0 for hardware virtualization

# Check KVM modules loaded:
lsmod | grep kvm

# Verify Docker has access to KVM:
ls -la /dev/kvm
# Expected: crw-rw---- 1 root kvm /dev/kvm

# Run OcNOS ContainerLab with max performance:
sudo containerlab deploy -t ocnos-topology.yaml --max-workers 4

Windows with WSL2

WSL2 (Windows Subsystem for Linux) provides a genuine Linux kernel environment that supports ContainerLab well. Docker Desktop with WSL2 backend is the recommended configuration.

# Windows WSL2 setup for OcNOS ContainerLab
#
# Step 1: Enable WSL2 with Ubuntu 22.04
wsl --install -d Ubuntu-22.04
wsl --set-version Ubuntu-22.04 2

# Step 2: Install Docker Desktop for Windows
# Enable: Settings > Resources > WSL Integration > Ubuntu-22.04

# Step 3: Inside WSL2 Ubuntu -- install ContainerLab
bash -c "$(curl -sL https://get.containerlab.dev)"

# Step 4: WSL2 kernel check (must be 5.15+)
uname -r

# Step 5: Load OcNOS image (copy to WSL2 filesystem first)
cp /mnt/c/Users/YourUser/Downloads/ocnos-demo.tar.gz ~/
docker load -i ~/ocnos-demo.tar.gz

# Known WSL2 limitation: large topologies (6+ nodes) may require
# increasing WSL2 memory allocation in .wslconfig:
# [wsl2]
# memory=12GB
# processors=6

macOS with Colima (Intel)

# macOS Intel -- Colima setup for OcNOS ContainerLab
#
# Install Homebrew, Colima, Docker CLI:
brew install colima docker docker-compose

# Start Colima with sufficient resources for OcNOS:
colima start --cpu 4 --memory 12 --disk 60   --vm-type vz --vz-rosetta false

# Load OcNOS image:
docker load -i ocnos-demo.tar.gz

# Install ContainerLab inside Colima VM:
# (SSH into Colima VM)
colima ssh
bash -c "$(curl -sL https://get.containerlab.dev)"

# Deploy topology:
sudo containerlab deploy -t ocnos-topology.yaml

macOS Apple Silicon (M1/M2/M3) — Limitations

OcNOS is an x86_64 binary. On Apple Silicon Macs, Docker must emulate x86_64 using QEMU, which introduces significant CPU overhead. A 3-node OcNOS topology that takes 30 seconds to boot on a Linux mini-PC may take 3–5 minutes on an M2 Mac. Functionally it works, but for anything beyond basic CLI testing, a dedicated Linux machine or WSL2 Windows workstation is strongly recommended.

# macOS Apple Silicon -- force x86 emulation (required for OcNOS)
colima start --cpu 4 --memory 12 --arch x86_64

# Verify emulation is active:
docker run --rm --platform linux/amd64 alpine uname -m
# Expected: x86_64

IP Infusion Engineering Team

Share