cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3487
Views
0
Helpful
5
Replies

Schedule IOS upgrade automatically

rmorenobb
Level 1
Level 1

Hi, 

Was looking for a way to kickoff a script to upgrade the IOS of switches on my network. 

I have a large number of devices that need IOS upgrades, and was looking at way to kick off the upgrades in groups. 

 

What I'd do before the IOS upgrade is stage the IOS image in the flash: of each switch stack.

Then at a certain time after business hours, kick off the upgrade. 

 

I'd like to have it automated so that all the following is entered without my intervention.

 

software install file flash:iosversion.bin

yes to proceed on all prompts

reload yes

 

Just thought I'd look into this.  I do have Cisco Prime, but no software imaging staging server, hence why I would tftp all IOS images before the upgrades manually.  If I can do it to Prime so that I don't have to answer the prompts for reload, etc., that would be good too. 

 

 

 

 

2 Accepted Solutions

Accepted Solutions

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

This can be done with Prime:

https://www.cisco.com/c/en/us/td/docs/net_mgmt/prime/infrastructure/3-0/user/guide/pi_ug/maint_images.html

 

Last time I used this feature two years ago, it worked 80% of the time. For the other 20% Primes inability to sanity check what it was doing resulted in it rebooting 40+ switches after deleting all the IOS images from their flash. The following morning was full of hours of blue cable and xmodem pain! I didn't use Prime for the this feature again.

 

Maybe the latest version of Prime has improved?(!!)

 

Cheers,

Seb.

View solution in original post

you could run the software install command with the on-reboot switch

and then schedule a reboot separately (reload at....) ?

 

reload [/verify | /noverify] [[warm file] [line | in [hhh:mm | mmm [text]] | at hh:mm [day month] [text]] | reason [reason-string] | cancel]

on-reboot

(optional) Indicates that the user should not prompted to reload when the installation operation completes. The user must then use the reload command to boot the system with the newly installed packages.

View solution in original post

5 Replies 5

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

This can be done with Prime:

https://www.cisco.com/c/en/us/td/docs/net_mgmt/prime/infrastructure/3-0/user/guide/pi_ug/maint_images.html

 

Last time I used this feature two years ago, it worked 80% of the time. For the other 20% Primes inability to sanity check what it was doing resulted in it rebooting 40+ switches after deleting all the IOS images from their flash. The following morning was full of hours of blue cable and xmodem pain! I didn't use Prime for the this feature again.

 

Maybe the latest version of Prime has improved?(!!)

 

Cheers,

Seb.

Well that scares me, but I'll give it a look, I may just continue on the path I'm doing, it's not that involved, so might be worth limiting the risk for now. 

 

Thank you though!

you could run the software install command with the on-reboot switch

and then schedule a reboot separately (reload at....) ?

 

reload [/verify | /noverify] [[warm file] [line | in [hhh:mm | mmm [text]] | at hh:mm [day month] [text]] | reason [reason-string] | cancel]

on-reboot

(optional) Indicates that the user should not prompted to reload when the installation operation completes. The user must then use the reload command to boot the system with the newly installed packages.

depends on what you mean by using a script. 

sounds like you're already going to have the software loaded and boot statements set.

 

what I would do is (IE-my script, PERL) feed a list of switches into the script and the script just does an snmp set to reload it.

 

you would need the following:

snmp-server system shutdown

snmp-server community <write community> RW 50 (where 50 is the acl that limits who can do snmp writes)

 

depending on how tight security is in your organization, you might not be able to do snmp writes.

 

or, it you have nothing better to do leading up to the maintenance window, log into each one and just set the "reload at" time to when you want them to reboot.

 

just a couple of ways to do this.

Since the command "request platform software package" is deprecated above 16.10 all of this has to happen via "install add" now - and I see no way to schedule this without using Prime (similar experience to @Seb Rupik above with Prime). 

 

Typically here I will schedule (and observe) the first half dozen to ensure I'm not storing up blue cable/Xmodem hell - then I'll set the devices so that on next restart they restart with new image. This has been my modus operandi for the last decade (albeit the exact detail has changed on how you achieve it between traditional IOS and IOS-XE devices).

 

Since the useful command for IOS-XE is now deprecated there is no alternative - and that means I get to wait up through the night to manually apply upgrades as the change window swings around. Given the nature of the business here, early hours of the morning are the only acceptable times to perform maintenance.

 

Welcome to the future!

Review Cisco Networking for a $25 gift card