Stop Virtual Lab¶
netlab down destroys a virtual lab created with netlab up command.
This command uses the lab topology or the snapshot file created by netlab up or netlab create to find the virtualization provider, and executes provider-specific CLI commands to destroy the virtual lab.
usage: netlab down [-h] [-v] [--cleanup] [--dry-run] [--force] [--snapshot [SNAPSHOT]] Destroy the virtual lab options: -h, --help show this help message and exit -v, --verbose Verbose logging (where applicable) --cleanup Remove all configuration files created by netlab create --dry-run Print the commands that would be executed, but do not execute them --force Force shutdown or cleanup (use at your own risk) --snapshot [SNAPSHOT] Transformed topology snapshot file
netlab down needs transformed topology data to find the virtualization provider and link (bridge) names.
netlab down reads the transformed topology from
netlab.snapshot.ymlfile created by netlab up or netlab create. You can specify a different snapshot file name, but you really should not.
--cleanupflag to delete all Ansible-, Vagrant- or containerlab-related configuration files.
--forceflag with the
--cleanupflag if you want to clean up the directory even when the virtualization provider fails during the shutdown process.
netlab down command checks the netlab status file (default:
~/.netlab/status.yml) to verify that the current lab instance (default:
default) is not running in another directory. You can decide to proceed if you want to remove netlab artifacts from the current directory, but the shutdown/cleanup process might impact the lab instance running in another directory.
After a successful completion, netlab down command removes the
netlab.lock file from the current directory, and all information about the lab instance from the netlab status file.