The content in this post is intended for educational and informational purposes only. All software rights belong to their respective owners.
Cisco includes the IOS on Linux (IOL) images available with the Cisco Modeling Labs (CML) Free Tier . Because IOL runs modern Cisco IOS-XE as a native Linux binary, it offers a lightweight, resource-friendly alternative for network emulation. This post will guide you through the process of creating Cisco IOL container images using Containerlab on macOS.
Prerequisite
macOS
-
Point your web browser to the CML Software Download page.
-
Click the Download icon for Cisco Modeling Labs reference platform ISO file (April 2026).
-
Log in with your Cisco.com (CCO ID) credentials when prompted.
-
Save the
refplat-20260409-free-iso.zipfile to your Downloads folder. -
Open your favorite terminal emulator, and change to the
Downloadsdirectory.
cd ~/Downloads
- Create the
cml210-refplatdirectory andiol*subdirectories.
mkdir -p cml210-refplat/{iol,ioll2}
- Uncompress the
refplat-20260409-free-iso.zipfile into thecml210-refplatdirectory.
unzip refplat-20260409-free-iso.zip -d cml210-refplat
- Attach the
refplat-20260409-freetier.isofile.
open cml210-refplat/refplat-20260409-free.iso
IOL L2
- Extract the contents of the
ioll2-xe-17-18-02.tar.gzfile to theioll2directory.
tar -xvf /Volumes/REFPLAT/virl-base-images/ioll2-xe-17-18-02/ioll2-xe-17-18-02.tar.gz -C ~/Downloads/cml210-refplat/ioll2
- Change to the
ioll2directory.
cd ~/Downloads/cml210-refplat/ioll2
- List the directory contents for
sha256sorted by file size.
ls -lSh blobs/sha256/
output:
total 496016
-rw-r--r--@ 1 marc staff 235M Apr 9 09:31 59fc7486ad1682cf83253a99ab9bb04be02304d15bf19dff5c434998c30f51c3
-rw-r--r--@ 1 marc staff 7.1M Apr 9 09:31 9f410b46920e9ac83c762a7d41da25d2cc60ad0d5625739ab3a82fef27ca4cb0
-rw-r--r--@ 1 marc staff 904B Apr 9 09:31 7435ed1aa8334b5c036097dd16f8f02eab81e3d9048a78336c91ba4ca0433649
-rw-r--r--@ 1 marc staff 890B Apr 9 09:31 a7b1018acebd32e107ec8b64b4bd99761a580fa9e70b9e99b65d10de72f461f8
-rw-r--r--@ 1 marc staff 555B Dec 31 1969 7219d143a70b3ad4afe8f7d7bbfd29d0be80ad12b56c6da0656cda0a94070c5d
-rw-r--r--@ 1 marc staff 401B Apr 9 09:31 9d2f9bd6088d9547a3c0864d93a4f85e37001a2cfefc90cb6973fa4f080b088b- Determine the file type for the largest file in the directory.
file blobs/sha256/59fc7486ad1682cf83253a99ab9bb04be02304d15bf19dff5c434998c30f51c3
output:
blobs/sha256/59fc7486ad1682cf83253a99ab9bb04be02304d15bf19dff5c434998c30f51c3: POSIX tar archive
- List the contents of the archive file.
tar -tf blobs/sha256/59fc7486ad1682cf83253a99ab9bb04be02304d15bf19dff5c434998c30f51c3
- Extract the
x86_64_crb_linux_l2-adventerprisek9-ms.iolfile from the archive file.
tar -xvf blobs/sha256/59fc7486ad1682cf83253a99ab9bb04be02304d15bf19dff5c434998c30f51c3 x86_64_crb_linux_l2-adventerprisek9-ms.iol
- Move the file to the
imagesdirectory on theclabLinux machine.
orb push -m clab x86_64_crb_linux_l2-adventerprisek9-ms.iol ~/images/
- Verify the file type.
orb -m clab -s "file ~/images/x86_64_crb_linux_l2-adventerprisek9-ms.iol"
- Get the Cisco IOS-XE version.
orb -m clab -s "strings ~/images/x86_64_crb_linux_l2-adventerprisek9-ms.iol | grep '^Cisco IOS Software'"
IOL
- Extract the contents of the
iol-xe-17-18-02.tar.gzfile to theioldirectory.
tar -xvf /Volumes/REFPLAT/virl-base-images/iol-xe-17-18-02/iol-xe-17-18-02.tar.gz -C ~/Downloads/cml210-refplat/iol
- Change to the
ioldirectory.
cd ~/Downloads/cml210-refplat/iol
- List the directory contents for
sha256sorted by file size.
ls -lSh blobs/sha256/
output:
total 602896
-rw-r--r--@ 1 marc staff 287M Apr 9 09:31 ac697212b57ca1706f4a5618a2b11e42746eb8d6e11f797d2878999ca108c955
-rw-r--r--@ 1 marc staff 7.1M Apr 9 09:31 9f410b46920e9ac83c762a7d41da25d2cc60ad0d5625739ab3a82fef27ca4cb0
-rw-r--r--@ 1 marc staff 904B Apr 9 09:31 294714c28f337d6c2effe325333ccb3ac6683867bb8a3fdf702dc2dbf58263bc
-rw-r--r--@ 1 marc staff 890B Apr 9 09:31 483954eb7b0eebc4965f692bb84dc3298b7e3c22ae2b2b6823c07b60807f2c4f
-rw-r--r--@ 1 marc staff 555B Dec 31 1969 f40471aaa9e41a28f62d200f7f350761eed98fe3b590d2dc6cf77ae6c914ce02
-rw-r--r--@ 1 marc staff 401B Apr 9 09:31 9d2f9bd6088d9547a3c0864d93a4f85e37001a2cfefc90cb6973fa4f080b088b- Determine the file type for the largest file in the directory.
file blobs/sha256/ac697212b57ca1706f4a5618a2b11e42746eb8d6e11f797d2878999ca108c955
output:
blobs/sha256/ac697212b57ca1706f4a5618a2b11e42746eb8d6e11f797d2878999ca108c955: POSIX tar archive
- List the contents of the archive file.
tar -tf blobs/sha256/ac697212b57ca1706f4a5618a2b11e42746eb8d6e11f797d2878999ca108c955
- Extract the
x86_64_crb_linux-adventerprisek9-ms.iolfile from the archive file.
tar -xvf blobs/sha256/ac697212b57ca1706f4a5618a2b11e42746eb8d6e11f797d2878999ca108c955 x86_64_crb_linux-adventerprisek9-ms.iol
- Move the file to the
imagesdirectory on theclabLinux machine.
orb push -m clab x86_64_crb_linux-adventerprisek9-ms.iol ~/images/
- Verify the file type.
orb -m clab -s "file ~/images/x86_64_crb_linux-adventerprisek9-ms.iol"
- Get the Cisco IOS-XE version.
orb -m clab -s "strings ~/images/x86_64_crb_linux-adventerprisek9-ms.iol | grep '^Cisco IOS Software'"
- Detach the
refplat-20260409-free.isofile from Finder.
Containerlab
- Log in to the
clabLinux machine.
orb -m clab
- Change to the
imagesdirectory.
cd ~/images
- Clone the srl-labs/vrnetlab repo from GitHub.
git clone https://github.com/srl-labs/vrnetlab.git
- Copy (and rename) the IOL L2 image to the
ioldirectory.
cp x86_64_crb_linux_l2-adventerprisek9-ms.iol vrnetlab/cisco/iol/cisco_iol-L2-17.18.02.bin
- Copy (and rename) the IOL image to the same
ioldirectory.
cp x86_64_crb_linux-adventerprisek9-ms.iol vrnetlab/cisco/iol/cisco_iol-17.18.02.bin
- Change to the
ioldirectory.
cd vrnetlab/cisco/iol
- Build the Cisco IOL container images.
DOCKER_DEFAULT_PLATFORM=linux/amd64 make docker-image
- Verify the Cisco IOL container images are now listed.
docker images vrnetlab/cisco_iol
Lab
- Change to the
ioldirectory.
cd ~/labs/iol
- Deploy the lab.
clab deploy
- Test SSH connectivity to the management interface of each node.
Give the nodes some time to complete the Cisco boot process.
for i in r sw; do sshpass -padmin ssh clab-iol-${i}1 'show version | in Ver'; done
- Destroy the lab.
clab destroy -c