cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1077
Views
0
Helpful
2
Replies

IOS-XR - How to get ZTP to start iPXE

h.lehnigk
Level 1
Level 1

Hello Team,

I try to upgrade large number of NCS55 and would like to use ZTP helping me with iPXE. For that I use a Linux machine with dhcp an web server. The DHCP Server is able to differentiate between iPXE and ZTP and if I start iPXE by command it runs fine.

My user script looks like that, but I am not sure if the confirmation with yes would work:

 

############################################################################

#                                                                           #

#   Script use admin to start iPXE Boot                                     #

#                                                                           #

#############################################################################

 

 

source /pkg/bin/ztp_helper.sh

 

export AAA_User=admin  && echo -ne "hw-module location all bootmedia network reload\n" | xrcmd "admin"

export AAA_User=admin  && echo -ne "yes\n" | xrcmd "admin"

 

The main problem from my point of view is that the machine will not execute the script and I have no idea where to find the error logs. I doesn't matter what I write into the script the ztp log looks alway like that:

 

2020-09-30 13:48:24,888 [INFO] {7857 : Engine} Begin executing user script in Global VRF NS...:

2020-09-30 13:48:24,935 [ERRO] {7857 : Engine} Failed executing script /disk0:/ztp/customer/config.candidate, with shell /bin/bash. Error ZError('Error executing command ip netns exec global-vrf /bin/bash -c /disk0:/ztp/customer/config.candidate: ',). Log saved at <_io.BufferedWriter name='/var/log/ztp_user_script.log'>

2020-09-30 13:48:24,935 [INFO] {7857 : Engine} Rolling back to previous state

2020-09-30 13:48:24,935 [DEBU] {7857 : Engine} Rolling back to the commit id 1000000116 using rollback configuration to-exclude 1000000116

2020-09-30 13:48:24,935 [DEBU] {7857 : Engine} Executing: source /pkg/bin/ztp_helper.sh && echo -ne  | xrcmd "rollback configuration to-exclude 1000000116"

(XR Network NS                 ) Wed Sep 30 13:48:25 UTC 2020: (pid  9705) (/pkg/bin/ztp_exec.sh)                  : Running user cmd: [rollback configuration to-exclude 1000000116]

 

Loading Rollback Changes.

Loaded Rollback Changes in 1 sec

Committing.2020-09-30 13:48:27,976 [INFO] {7857 : Engine} Waiting on config apply finish

2020-09-30 13:48:27,976 [DEBU] {7857 : Engine} Applying XR config revert file

2020-09-30 13:48:27,977 [DEBU] {7857 : Engine} Will apply the following: /disk0:/ztp/xr_config/xr_config_to_revert

(XR Network NS                 ) Wed Sep 30 13:48:28 UTC 2020: (pid  9821) (/pkg/bin/ztp_exec.sh)                  : Applying configuration (Reverting to xr config revert file.):

 

Maybe there is somebody how has done this and can help me.

Hubert

2 Replies 2

Hi,

I have the same issue.

 

Did you find a way to solve it?

 

Thank you

 

BR

Hello Christian,

We run this solution with ZTP since two years now. I solved it with TAC. You need for ZTP a signed Golden Image. If you bake one by yourself it will run with PXE boot but not with ZTP.

 

Regards

Hubert

Review Cisco Networking for a $25 gift card