Cisco IOS-XE Install Mode Upgrade

This script is just an update of a previous one that was tested on standalone and stacked Cisco Catalyst 9300 and 9500s running IOS-XE software releases in INSTALL mode. 

In theory, this should still work for any IOS-XE switch that supports the 'install' commands.

The script TFTPs the IOS-XE image from your Solarwinds File Repository to the switch, verifies its hash (remember to update this with the hash from software.cisco.com), runs 'install add, activate, and commit' with no prompt, and verifies successful upgrade after waiting for the switch to reboot.

With the limitations of the template maker, I could not add 'install inactive remove' to the upgrade verification because it does not wait for the switch to compile the list of files to remove before having to input 'yes/no'. After the upgrades are complete, you can run a job in NCM or manually enter install inactive remove to clean up the old image files.

  • Hey! I've only worked with the default TFTP repo, but I don't think you should have to update the script itself if you have a different repo location. The script should auto-populate the necessary info if you're able to select the image you're upgrading to from "Select New Image From Repository" in the Upgrade Template.



  • Hey narnox,

    install add file ${NewImageSlot}${NewImageName} activate commit prompt-level none${CRLF}

    Allows you to run the install add, activate, and commit in one command without requiring interaction. It basically translates in CLI: install add file flash:(file-name-here) activate commit prompt-level none

  • Our SolarWinds Repository is not the same location as the TFTP Root. Does it need to be?
    What I see from the upgrade script logs is it tries to pull the image from the TFTP Folder but the image is not there.
    However in the Firmware Upgrade Settings I have designated a File share where the image resides.
    I did select this image from repository when updating the Upgrade Template.

  • Hi jiahmed,

    Thanks for posting this script. Unfortunately, our company's compliance rules do not allow the use of external scripts to upgrade network devices.
    Perhaps you could give a little introduction on how you managed to perform the firmware upgrade on the Cisco 9200 series. So far I've only managed to push an IOS image to one device. But I don't know how to automatically activate the image on the device, as the "install active commit" exec-command needs confirmation. How do I handle those confirmations?

    Best regards
    narnox