Skip to content

Operate Local Containerlab

Use this blueprint on Ubuntu 22.04 or 24.04, including Ubuntu 24.04 under Windows WSL2. Complete the Quickstart first.

The Linux account running HybridOps needs sudo access. HybridOps requests the account password when privileged work is required and does not store it.

1. Initialise the blueprint

ENV=containerlab-local
REF=linux/containerlab@v1

hyops blueprint init \
  --env "$ENV" \
  --ref "$REF" \
  --edit

Set containerlab_lab_source_dir to an absolute Linux path containing lab.clab.yml and its relative files. For IOL-XE, set the authorised image directory fields documented in the blueprint.

Keep KVM checks disabled for container-native nodes. Enable containerlab_require_kvm and containerlab_healthcheck_require_kvm only when the selected node kinds require KVM.

2. Validate and deploy

hyops blueprint validate --env "$ENV" --ref "$REF"
hyops blueprint plan --env "$ENV" --ref "$REF"
hyops blueprint preflight --env "$ENV" --ref "$REF"
hyops blueprint deploy --env "$ENV" --ref "$REF" --execute

Enter the Linux account password at the sudo prompt. Deployment completes after the runtime, topology, browser interface, health checks and recovery guard pass.

3. Open the browser interface

hyops blueprint access --env "$ENV" --ref "$REF"

Sign in with the current Linux account. Under WSL2, the same command opens the interface in the Windows browser.

4. Prepare device access

hyops blueprint access --env "$ENV" --ref "$REF" --automation
hyops blueprint device list --env "$ENV" --ref "$REF"

Use the discovered device name with the required operation:

hyops blueprint device edit --env "$ENV" --ref "$REF"
hyops blueprint device ping --env "$ENV" --ref "$REF" <device>
hyops blueprint device ssh --env "$ENV" --ref "$REF" <device>
hyops blueprint device web --env "$ENV" --ref "$REF" <device> --scheme http --port 80

device edit sets device-specific usernames, ports and web services when the topology does not provide them.

5. Preserve or remove the lab

hyops blueprint destroy --env "$ENV" --ref "$REF" --execute

Choose whether to retain the environment, preserve and verify recovery state before teardown, or destroy without preservation. The Containerlab runtime is retained, and teardown is scoped to the topology staged by this blueprint; other local Containerlab labs are not selected.

A later interactive deploy offers the latest verified recovery set or a clean deployment. If the archived and controller topologies differ, select the archive, the controller source without saved state, or cancellation. For an unattended run, use --restore-labs for the archive or --skip-lab-restore for the controller source. The controller file is not rewritten.

Failure boundaries

  • Retry after correcting a failed sudo prompt; no privileged stage proceeds.
  • Correct topology paths and image availability before deployment.
  • Do not bypass a failed recovery verification when the lab must be retained.
  • Run access --automation before device commands when generated targets are unavailable.

References

License: MIT-0 for code, CC-BY-4.0 for documentation