Troubleshoot Archive Directory Creation During ZTD
Problem
Cisco IoT FND fails to create the bootflash:archive
directory during the bootstrap phase. This causes the ZTD (Zero Touch Deployment) onboarding to fail, resulting in configuration
rollback error during tunnel provisioning.
![]() Note |
If the directory already exists, the issue does not occur. |
Solution
Here are the steps to address the directory creation issue:
-
Check the cgms.properties if the
reload-during-bootstrap
property is set totrue
orfalse
.Note
By default, the
reload-during-bootstrap
property is set tofalse
.
-
Take action based on the
reload-during-bootstrap
value:If
reload-during-bootstrap
is set totrue
.Create the archive directory using one of the following methods:
-
Manually create the directory
bootflash:archive
on the router before initiating the bootstrap process. -
Automate the process using an EEM (Embedded Event Manager) script and add it to the bootstrap config. Here's an example:
event manager applet post_pnp event timer watchdog time 30 action 10.0 cli command "enable" action 15.0 cli command "file prompt quiet" action 18.0 cli command "do mkdir bootflash:archive" action 20.0 cli command "archive" action 21.0 cli command "path bootflash:/archive/" action 22.0 cli command "maximum 8" action 24.0 cli command "no event manager applet post_pnp"
-
-
If
reload-during-bootstrap
is set to false, addfile prompt quiet
in the bootstrap template:Ensure the
file prompt quiet
command is included to suppress interactive confirmation prompts during directory creation. Here's an example:! <#-- Creating archive directory on bootflash --> file prompt quiet do mkdir bootflash:archive ! archive path bootflash:/archive/ maximum 8 !
-
Alternatively, you can use an alternative archive path:
Specify a different directory path, such as
bootflash:
, to avoid the issue. Here's an example:! <#-- Configuring archive path to bootflash --> archive path bootflash: maximum 8 !
-
Initiate the ZTD to confirm the issue is resolved after applying one of the solutions.