Capture an Existing Network Lab for Migration¶
- Purpose: Bring an existing lab under the same recovery and reconstruction contract as a declared environment.
- Owner: Platform operations
- Impact: Reads source data through SSH and writes local archives. Source files are not rewritten, but node-state capture may quiesce and stop running guests.
- Rollback strategy: Remove incomplete local outputs and rerun. The source lab remains authoritative until target acceptance.
Pre-checks¶
Check SSH access, output capacity, and the platform-specific recovery boundary. Use an identity file when the source already trusts an operator key; otherwise OpenSSH may prompt for a password.
For EVE-NG node-state capture, shut down stateful guests inside their operating
systems before confirming --guest-quiesced.
Execute¶
Capture the portable definition set:
hyops lab migrate capture \
--platform <eve-ng|gns3|containerlab> \
--host <source-host> \
--user <ssh-user> \
--identity-file ~/.ssh/id_ed25519 \
--output <lab-archive.tar.gz>
Add --become when the SSH user requires passwordless privilege escalation.
For a complete EVE-NG recovery set:
hyops lab migrate capture \
--platform eve-ng \
--host <source-host> \
--user <ssh-user> \
--identity-file ~/.ssh/id_ed25519 \
--become \
--output <lab-archive.tar.gz> \
--include-node-state \
--guest-quiesced \
--include-images
For Containerlab, set --source-root to the authoritative topology directory
and use --topology-relpath when the file is not lab.clab.yml.
Verify¶
Capture must finish with status=compatible, archive checksums, definition
count, and the requested companion-state summary. This proves the candidate
bundle, not the target outcome. Do not retire the source host until import and
target continuity validation pass.
Records¶
Retain the primary archive, its SHA-256, and any node-state or image companion archives. Licence material is excluded and must be supplied independently.
Rollback¶
Delete incomplete candidate files and rerun with --force only when replacing
the named outputs is intended.