Reply
Accepted Solution

NetMRI - Install NX-OS on Nexus 5K switch

sutherla
Techie
Posts: 2
5481     0

Hi,

 

I have built a CCS script with the following action command:

 

install all kickstart bootflash:///$New_kickstart_image system bootflash:///$New_system_image

 

But the CCS script cannot get a Y/N option that appears at the end of the nx-os install process:

 

Switch will be reloaded for disruptive upgrade.

Do you want to continue with the installation (y/n)? [n] y
 
Any ideas on how to answer 'y' in the action command?

Re: NetMRI - Install NX-OS on Nexus 5K switch

Adviser
Posts: 353
5482     0
Try something like:


install all kickstart bootflash:///$New_kickstart_image system bootflash:///$New_system_image\ry\r

I think that is right but you might need \\, I can’t recall. You can also look for similar issues in the forum here that should make it clear.

John

Re: NetMRI - Install NX-OS on Nexus 5K switch

sutherla
Techie
Posts: 2
5482     0

Hi,

 

This worked with \\ry\\r

 

Thanks

 

Andy

 

 

Re: NetMRI - Install NX-OS on Nexus 5K switch

B_Lindor
Techie
Posts: 9
5482     0

Hi Andy, 

 

Good to see you were able to get that working. 

 

I'm in the process of building a similar script but running into a small issue myself. 

 

Does your script include the ftp of the NX-OS system file to the device itself? The problem I'm having is NetMRI not being able to take input for the password after the copy command is executed. 

 

Once the following command is executed, it requires input for the ftp password. 

copy ftp://test@1.1.1.1/Nexus5000/$system_image bootflash: vrf management

 

It almost appears as if the NetMRI is not waiting for the "Password" prompt to appear before passing the command.

 

 0055-1slab-n5k-test-sw1# copy ftp://cisco@147.179.188.54/Nexus5000/n5000-uk9-kickstart.7.3.3.N1.1.bin bootflash: vrf management Password: Login incorrect. Login failed.

Please login with USER and PASS.

Please login with USER and PASS.

Please login with USER and PASS.

***** Transfer of file aborted, file not found or Login failed***** Error during copy ***** Transfer of file aborted ***** 0055-1slab-n5k-test-sw1# *** Job Failed [1] *** 

 

 

Any assistance at all would be greatly appreciated. 

 

Thanks!

 

-Berland

Re: NetMRI - Install NX-OS on Nexus 5K switch

Expert
Posts: 229
5482     0

In CCS, it's looking for the regular NX-OS prompt, not "Pasword:"

Can't you put it all on one line as "copy ftp://ciscoSmiley Tongueassword@147.179.188.54..."?

Re: NetMRI - Install NX-OS on Nexus 5K switch

B_Lindor
Techie
Posts: 9
5482     0

Unfortunatelty - the syntax for NXOS doesn't allow for the password input to be included on a single line unlike the copy ftp command available on IOS type devices, atleast from what I see. If you have an alternative to that command, can you please share it?

 

Syntax for copy ftp on NXOS.
ftp:  Enter URL "ftp:[//[username@]server][/path]"

 

 

Here is the output from the CLI when the command is executed. As you can see, the n5k is looking for a corresponding password to the "cisco" username.

 

1slab-n5k-test-sw1# copy ftp://cisco@1.1.1.1/Nexus5000/n5000-uk9-kickstart.7.3.3.N1.1.bin bootflash: vrf management
Password:

 

I can't seem to find a way for NetMRI to successfully accept the password string and continue with the FTP transfer. 

Re: NetMRI - Install NX-OS on Nexus 5K switch

Adviser
Posts: 406
5482     0

 

 

 

For grins and giggle let's try this after you FTP command Smiley Happy

Output-Triggers:
	Check Password

#########################################################################
Trigger:
	Check Password

Trigger-Description:
	This trigger matches Password Prompt

Trigger-Variables:
	$mypass	/Password:/
	
Trigger-Template:
	[[$mypass]]

Trigger-Commands:
	password_goes_here

Also, I think this should work:

copy ftp://cisco@1.1.1.1/Nexus5000/n5000-uk9-kickstart.7.3.3.N1.1.bin bootflash: vrf \rmypassword\r
Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

Re: NetMRI - Install NX-OS on Nexus 5K switch

B_Lindor
Techie
Posts: 9
5482     0

Hey Sif - Hope all is well man!

 

I went ahead and gave the FTP command a shot that you provided below and unfortunately still to no avail. It still appears that NetMRI is providing the password to the device before the Password: prompt appears.  (Sample output below)

 

1slab-n5k-test-sw1# copy ftp://cisco@1.1.1.1/Nexus5000/n5000-uk9-kickstart.7.3.3.N1.1.bin bootflash: vrf management

 

mypassword

 

Password:

Login incorrect.

Login failed.

Please login with USER and PASS.

Please login with USER and PASS.

Please login with USER and PASS.

***** Transfer of file aborted, file not found or Login failed*****

Error during copy

***** Transfer of file aborted *****

 

1slab-n5k-test-sw1#

 

*** Job Failed [1] ***

 

 

I also included the Output-Trigger into the script to match the Password: prompt output and it doesn't seem to match it at all. The script fails once the login fails. 

 

-Berland

Re: NetMRI - Install NX-OS on Nexus 5K switch

Adviser
Posts: 406
5482     0
copy ftp://cisco@1.1.1.1/Nexus5000/n5000-uk9-kickstart.7.3.3.N1.1.bin bootflash: vrf mypassword\r

Maybe this one

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

Re: NetMRI - Install NX-OS on Nexus 5K switch

B_Lindor
Techie
Posts: 9
5482     0

No Luck - that syntax interprets the password as part of the original command. 

 

1slab-n5k-test-sw1# copy ftp://cisco@1.1.1.1/Nexus5000/n5000-uk9-kickstart.7.3.3.N1.1.bin bootflash: vrf management mypassword

                           ^

% Invalid command at '^' marker.

 

1slab-n5k-test-sw1#

Showing results for 
Search instead for 
Do you mean 

Recommended for You