srl-labs / containerlab

container-based networking labs
https://containerlab.dev
BSD 3-Clause "New" or "Revised" License
1.47k stars 249 forks source link

cisco_xrv9k kind fails to start container as expected #2113

Closed KramKroc closed 2 months ago

KramKroc commented 2 months ago

With the following topology file:

name: vr04

topology:
  nodes:
    xrv9k:
      kind: cisco_xrv9k
      image: vrnetlab/vr-xrv9k:7.7.2 # do not forget to re-tag the image if needed

Using the latest vrnetlab, I created a docker image of version 7.7.2 of xrv9k:

vrnetlab/vr-xrv9k                                                      7.7.2                f19a9e5c26ce   3 hours ago     7.12GB

When the topology is deployed:

clab deploy
INFO[0000] Containerlab v0.55.1 started
INFO[0000] Parsing & checking topology file: vr04.clab.yml
INFO[0000] Creating lab directory: /home/cntrlab/xrv9k/clab-vr04
INFO[0000] Creating container: "xrv9k"
INFO[0000] Adding containerlab host entries to /etc/hosts file
INFO[0000] Adding ssh config for containerlab nodes
+---+-----------------+--------------+-------------------------+-------------+---------+----------------+----------------------+
| # |      Name       | Container ID |          Image          |    Kind     |  State  |  IPv4 Address  |     IPv6 Address     |
+---+-----------------+--------------+-------------------------+-------------+---------+----------------+----------------------+
| 1 | clab-vr04-xrv9k | c9cca3b689e8 | vrnetlab/vr-xrv9k:7.7.2 | cisco_xrv9k | running | 172.20.20.2/24 | 2001:172:20:20::2/64 |
+---+-----------------+--------------+-------------------------+-------------+---------+----------------+----------------------+

But when the logs are checked:

docker logs -f c9cca3b689e8
usage: launch.py
       [-h]
       [--trace]
       [--username USERNAME]
       [--password PASSWORD]
       [--install]
       [--num-nics NUM_NICS]
       [--ram RAM]
launch.py: error: unrecognized arguments: --hostname xrv9k --connection-mode tc --vcpu 2

The following is the version of containerlab used:

clab version

  ____ ___  _   _ _____  _    ___ _   _ _____ ____  _       _
 / ___/ _ \| \ | |_   _|/ \  |_ _| \ | | ____|  _ \| | __ _| |__
| |  | | | |  \| | | | / _ \  | ||  \| |  _| | |_) | |/ _` | '_ \
| |__| |_| | |\  | | |/ ___ \ | || |\  | |___|  _ <| | (_| | |_) |
 \____\___/|_| \_| |_/_/   \_\___|_| \_|_____|_| \_\_|\__,_|_.__/

    version: 0.55.1
     commit: 08c7f447
       date: 2024-06-22T19:42:45Z
     source: https://github.com/srl-labs/containerlab
 rel. notes: https://containerlab.dev/rn/0.55/#0551
hellt commented 2 months ago

You have to use hellt/vrnetlab. Not vrnetlab/vrnetlab. And the error log most likely indicates that you used the wrong project

KramKroc commented 2 months ago

You have to use hellt/vrnetlab. Not vrnetlab/vrnetlab. And the error log most likely indicates that you used the wrong project

The log snippet above is literally all that is logged from the xrv9k container. Just in case I stumble across this issue again in future, the hellt fork is documented for use here: https://containerlab.dev/manual/vrnetlab/#building-vrnetlab-images