Friday, October 9, 2020

Guestshell on IOS XE (Limitations on CSR1000v?)

Anybody with experience with guestshell on IOS XE? (Specifically on CSR100v..)

Building a script that will be executed with ZTP on c9K-switches to update the software version if incorrect and then download a unique .cfg for that device's serialnumber. We have pretty big configs for the switches this will provision so it would be best if we built the config files with a different script and then download them onto the boxes via TFTP/FTP.

Problem I'm having is that the CLI-module inside guestshell can't parse the copy-function in IOS. I've seen working scripts downloading new software images via TFTP on 9200 and 9300-hardware but I don't have access to the hardware we'll be shipping yet and would prefer working on this with virtualized hardware..

So TL;DR: anyone know if CSR1000v has limitations in guestshell as to what it can access?

Issue:

*Oct 9 07:55:30.355: SHELL-EXECUTION: executing command "python2 >/bootflash/downloaded_script.py " inside guestshell ...918KS0BBJ6X

*** Setting TFTP-settings ***

Line 1 SUCCESS: file prompt quiet

Line 2 SUCCESS: ip tftp blocksize 8192

*** Transfering file.. ***

ConfigError: There was a problem with 1 commands while configuring the device.

Line 1 FAILURE: copy tftp://10.0.10.204/config_files/918KS0BBJ6X flash:/918KS0BBJ6X (PARSE_ERROR_NOMATCH)

**CLI Line # 1: copy tftp://10.0.10.204/config_files/918KS0BBJ6X flash:/918KS0BBJ6X

**CLI Line # 1: ^

**CLI Line # 1: % Invalid input detected at '' marker.

(In)sanity check

import cli

cli.configurep(test)

ConfigError: There was a problem with 1 commands while configuring the device.

Line 1 FAILURE: copy running-config startup-config (PARSE_ERROR_NOMATCH)

**CLI Line # 1: copy running-config startup-config

**CLI Line # 1: ^

**CLI Line # 1: % Invalid input detected at '' marker.

test2 = "wr"

cli.configurep(test2)

ConfigError: There was a problem with 1 commands while configuring the device.

Line 1 FAILURE: wr (PARSE_ERROR_NOMATCH)

**CLI Line # 1: wr

**CLI Line # 1: ^

**CLI Line # 1: % Invalid input detected at '' marker.



No comments:

Post a Comment