This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Automating IOS update

We are looking to see if it is possible within NCM to automate the process of upgrading Cisco IOS. Where Solarwinds actively searches for nodes that have code that differs from our standard and automatically updates it.

Is this possible through NCM or something to put on a wish list?

  • You should be able to do this based on the reports feature in NCM. Most places require a maintenance window to deploy/make changes?

    If that is not your case, you can schedule the nodes within ncm to perform the update that way.

    I don't see an option to check the ios version and deploy an appropriate image.

    Because we have different models, we deploy updates based on site and device type.

    Hope this helps.

  • Not sure this is what you were trying to do. May be worth a try...

    Run a report and have the remediation set to run a script you may be able to make this happen.

    remediation.PNG

  • I subject close to my own heart, as we are having to go through the pain. If you create a config change template like this below, these are for a stacked 2960X using a bin file you can then schedule it as a job to do when you want it to be done.

    pastedImage_0.png

    nothing special but works using our test stack this wont delete the old image there is one that does.This will itterate through upto 7 stacked switches.

    /*

    .CHANGE_TEMPLATE_DESCRIPTION

            This change script allows you erase the flash on Cisco IOS routers/switches and copy a new IOS .BIN image via tftp.

    .PLATFORM_DESCRIPTION

            This runs on Cisco IOS devices.

    .PARAMETER_LABEL @ContextNode

            NCM Node

    .PARAMETER_DESCRIPTION @ContextNode

            The node the template will operate on.  All templates require this by default. The target node is selected during the first part of the wizard so it will not be available for selection when defining values of variables.

    .PARAMETER_LABEL @IOS_FILENAME

            The File Name of the new IOS Version.

    .PARAMETER_DESCRIPTION @IOS_FILENAME

            This should be a valid Cisco IOS .BIN File. No spaces are allowed. A script will not be generated for a Cisco IOS Filename that includes a space.

    */

    script UpgradeIOS (

                             NCM.Nodes @ContextNode,

                             string @IOS_FILENAME )

    {

    string @FilePromptQuiet = 'file prompt quiet'

    string @NoFilePromptQuiet = 'no file prompt quiet'

    string @Exit = 'exit'

    string @CopyImg = 'copy http://IP Address of server /' + @IOS_FILENAME

    string @CopyImg2 = ' flash1:' + @IOS_FILENAME

    string @CopyImg2A = ' flash2:' + @IOS_FILENAME

    string @CopyImg2B = ' flash3:' + @IOS_FILENAME

    string @CopyImg2C = ' flash4:' + @IOS_FILENAME

    string @CopyImg2D = ' flash5:' + @IOS_FILENAME

    string @CopyImg2E = ' flash6:' + @IOS_FILENAME

    string @CopyImg2F = ' flash7:' + @IOS_FILENAME

    string @CopyImg3 = @CopyImg + @CopyImg2

    string @CopyImg4 = @CopyImg + @CopyImg2A

    string @CopyImg5 = @CopyImg + @CopyImg2B

    string @CopyImg6 = @CopyImg + @CopyImg2C

    string @CopyImg7 = @CopyImg + @CopyImg2D

    string @CopyImg8 = @CopyImg + @CopyImg2E

    string @CopyImg9 = @CopyImg + @CopyImg2F

    string @ConfT = 'conf t'

    string @BootSys = 'boot system switch all flash:/' + @IOS_FILENAME

    if (@IOS_FILENAME contains ' ')

    {}

    else

    {

      foreach ( @node in @ContextNode )

      {

        if ( @node.Vendor == 'Cisco' )

        {

            CLI

            {

    @ConfT

    @FilePromptQuiet

    @Exit

    @CopyImg3

    @CopyImg4

    @CopyImg5

    @CopyImg6

    @CopyImg7

    @CopyImg8

    @CopyImg9

    @ConfT

    @BootSys

    do wr mem

    exit

    reload

    Y

            }

        }

      }

    }

    }

  • This is a feature request, as we currently do not do this natively in NCM.