Skip to content

infra: add Cisco NX-OS (n9kv) to EC2 image bootstrap#181

Merged
dhalperi merged 1 commit into
mainfrom
spr/main/c0af1752
May 20, 2026
Merged

infra: add Cisco NX-OS (n9kv) to EC2 image bootstrap#181
dhalperi merged 1 commit into
mainfrom
spr/main/c0af1752

Conversation

@dhalperi
Copy link
Copy Markdown
Member

@dhalperi dhalperi commented May 20, 2026

Wires the lab builder for Cisco Nexus 9000v qcow2 images so a
nexus9300v64..qcow2 dropped in infra/images/ and uploaded to
S3 builds the vrnetlab/cisco_n9kv: container on first launch
and is loaded directly thereafter.

ec2-setup.sh changes:

  • Refactor image classification into a classify_image helper used by
    both the docker-tarball load path and the qcow2 build path. Add the
    Cisco mapping (nexus9300v*|nexus9500v*|nxosv*|n9kv*|nxos ->
    vrnetlab/cisco/n9kv).
  • vrnetlab's cisco/n9kv Makefile globs n9kv-.qcow2; rename
    Cisco's nexus9300v64..qcow2 to that form when staging into
    the vrnetlab tree so the resulting docker tag is
    vrnetlab/cisco_n9kv:.
  • Run the qcow2 build path in addition to (rather than instead of) the
    pre-built tarball path, filtered by --images and what was already
    loaded. Previously, presence of any pre-built tarball in S3 would
    short-circuit qcow2 builds for other vendors.
  • Tolerate grep no-match in the post-build docker-tag lookup
    (grep ... || true) and treat upload failures as warnings rather
    than aborting the bootstrap. Without this, set -euo pipefail killed
    cloud-final after a successful build whenever the docker-tag grep
    pattern did not match.

ec2-launch.sh / README: document nxos in the --images filter values.

Smoke-tested end to end on a fresh m8i.2xlarge: built
vrnetlab/cisco_n9kv:10.3.9.M from
nexus9300v64.10.3.9.M.qcow2, deployed it under containerlab as
cisco_n9kv, and confirmed show version reports NX-OS 10.3(9) over
SSH.


Prompt:

I want to add Cisco VMs to our setup. For NX-OS 10, I have:

[Cisco download page listing nexus9300v64-lite/full and nexus9500v64
in .box / .ova / .qcow2 / .vagrant variants]

I don't know what to look for for IOS XE, ASA, or IOS XR

Follow-ups in the same task: picked
nexus9300v64.10.3.9.M.qcow2 (full features, KVM); confirmed
infra/ec2-setup.sh + ec2-launch.sh did not yet recognize NX-OS;
authorized wiring it up end-to-end on a fresh EC2 instance separate
from another running lab-validation session, including upload to S3,
build, smoke-test, and teardown.


Stack:


⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

Wires the lab builder for Cisco Nexus 9000v qcow2 images so a
nexus9300v64.<version>.qcow2 dropped in infra/images/ and uploaded to
S3 builds the vrnetlab/cisco_n9kv:<version> container on first launch
and is loaded directly thereafter.

ec2-setup.sh changes:

- Refactor image classification into a classify_image helper used by
  both the docker-tarball load path and the qcow2 build path. Add the
  Cisco mapping (nexus9300v*|nexus9500v*|nxosv*|n9kv*|*nxos* ->
  vrnetlab/cisco/n9kv).
- vrnetlab's cisco/n9kv Makefile globs n9kv-<version>.qcow2; rename
  Cisco's nexus9300v64.<version>.qcow2 to that form when staging into
  the vrnetlab tree so the resulting docker tag is
  vrnetlab/cisco_n9kv:<version>.
- Run the qcow2 build path in addition to (rather than instead of) the
  pre-built tarball path, filtered by --images and what was already
  loaded. Previously, presence of any pre-built tarball in S3 would
  short-circuit qcow2 builds for other vendors.
- Tolerate `grep` no-match in the post-build docker-tag lookup
  (`grep ... || true`) and treat upload failures as warnings rather
  than aborting the bootstrap. Without this, set -euo pipefail killed
  cloud-final after a successful build whenever the docker-tag grep
  pattern did not match.

ec2-launch.sh / README: document `nxos` in the --images filter values.

Smoke-tested end to end on a fresh m8i.2xlarge: built
vrnetlab/cisco_n9kv:10.3.9.M from
nexus9300v64.10.3.9.M.qcow2, deployed it under containerlab as
cisco_n9kv, and confirmed `show version` reports NX-OS 10.3(9) over
SSH.

----

Prompt:
```
I want to add Cisco VMs to our setup. For NX-OS 10, I have:

[Cisco download page listing nexus9300v64-lite/full and nexus9500v64
in .box / .ova / .qcow2 / .vagrant variants]

I don't know what to look for for IOS XE, ASA, or IOS XR
```

Follow-ups in the same task: picked
nexus9300v64.10.3.9.M.qcow2 (full features, KVM); confirmed
infra/ec2-setup.sh + ec2-launch.sh did not yet recognize NX-OS;
authorized wiring it up end-to-end on a fresh EC2 instance separate
from another running lab-validation session, including upload to S3,
build, smoke-test, and teardown.

commit-id:c0af1752
@dhalperi dhalperi enabled auto-merge (squash) May 20, 2026 03:14
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.59%. Comparing base (8048e8d) to head (8526e8c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #181   +/-   ##
=======================================
  Coverage   83.59%   83.59%           
=======================================
  Files          87       87           
  Lines        4194     4194           
=======================================
  Hits         3506     3506           
  Misses        688      688           
Flag Coverage Δ
unittests 83.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dhalperi dhalperi merged commit 7417fa0 into main May 20, 2026
113 checks passed
@dhalperi dhalperi deleted the spr/main/c0af1752 branch May 20, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants