- Overview
- Product Documentation
- CML 2.8 Release Notes
- CML 2.8 Installation Guide
- CML 2.8 User Guide
- CML 2.8 Admin Guide
- CML Administrator's Guide
- Cisco Modeling Labs System Overview
- System Defaults
- Creating a New Node Definition
- Node Definition SMBIOS Parameters Specification
- Custom VM Images
- Clustering
- CML Admin Tools
- System Settings
- Networking
- Resources
Extracting Configurations¶
You can retrieve the running configurations from active nodes in your CML labs. This functionality allows you to preserve or share configurations, ensuring that they are not lost when the node is wiped.
You can extract configurations for an individual node or multiple nodes simultaneously. The process is identical regardless of the number of nodes:
Procedure
Open the lab in the Workbench.
Start the nodes. A node must be running before you can extract its configuration.
Navigate to the Nodes tab to view the Nodes pane.
Select nodes by checking the checkbox adjacent to the nodes’ names.
Click the Extract Config option at the top of the Nodes pane.
Await the completion of the configuration extraction process.
Upon successful extraction, you can review the configurations in the node’s Config tab on the Sidebar pane. For additional details on node configurations, refer to Node Configuration Files.
Note
If you download a lab, the node configurations will be saved in the downloaded .yaml file among other lab properties. All configurations and other lab properties will be loaded when the .yaml file is imported into CML.
Caution
Not all nodes have the capability to extract configurations. If you attempt to extract configuration from a node that does not support configuration extraction, it will be ignored. Also, the option to extract configurations is usually disabled in the CML UI for nodes that do not support configuration extraction. The configuration extraction can be configured only on node types that support console-based access and have a pyATS plugin available for them.
To learn more about how to customize configuration extraction, please see the Configuration Extraction Customization section on the Creating a New Node Definition page.
Usage and Tips¶
Note
The initial extraction for nodes booted for the first time or after a wipe will yield their Startup configuration. Certain nodes, particularly those with IOS XE software, differentiate between Startup and Running configurations. They will revert to Startup configuration upon reboot, regardless of any alterations made to the Running configuration. To retain changes in the Running configuration, users must manually execute copy running-config startup-config on each node before stopping it. To preserve the Running configuration after a node wipe, users should extract the configuration.
Caution
Verify the accuracy of extracted configurations every time before reapplying them. Some nodes may not produce a reusable configuration without user intervention. Below are some known issues:
A
Tab
character positioned before aquit
statement within acrypto pki
block can cause the configuration to be output as a quoted string rather than a block (observed in CSR 1000v devices).For example, an extracted configuration from a CSR 1000V with default settings may look like this:
... ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ...
On IOSv nodes, banners might duplicate the
C
character at the line’s end where^C
signifies EOF. Each additional Stop, Wipe, and Configuration Extraction results in an additionalC
. When reusing the configuration, it may fail to load correctly, causing an error.An example of an initial configuration on IOSv:
... **************************************************************************^C banner login ^C ************************************************************************** ...
After extraction, the configuration could appear as:
... **************************************************************************^C banner login ^CC ************************************************************************** ...
Some nodes, such as IOSv, require interfaces to be activated with the
no shutdown
command, butshow run
might not display this. In such cases, theno shutdown
command must be reapplied to each interface manually.An example of an initial configuration on IOSv with an active link connected to the interface:
... interface GigabitEthernet0/1 description to GigabitEthernet0/1.iosv-0 no ip address no shutdown ...
And the corresponding extracted configuration might omit the crucial command:
... interface GigabitEthernet0/1 description to GigabitEthernet0/1.iosv-0 no ip address duplex auto speed auto media-type rj45 ...