Upgrade or Downgrade Cisco IOS Image


With the Image Service feature, you can not only update the Cisco IOS image on a device, you can revert back to an earlier version of the image. When you do this, the availability of Cisco Configuration Engine agents on the device might change. This means you might have to use IMGW to simulate agents to update configurations and images on the device.

Cisco Configuration Engine agents at the device-level are a function of the particular version of Cisco IOS running on that device:

12.0 or earlier - No Cisco Configuration Engine agents on the device.

12.2 - Configuration Agent and Event Agent but not the Image Agent.

12.3(3) or later - Configuration Agent, Event Agent, and Image Agent.

Things to Know

IMGW can simulate different agent types:

Configuration Agent only

Image Agent only

both Configuration Agent and Image Agent

Make sure to select the correct agent for your purpose when creating IMGW devices.

You should always have one set of the same agents running for the same device object. The common mistake when upgrading/downgrading to a different version of an image is:

Upgrading: after enabling a certain agent on the device, you still have an IMGW device that is simulating the same agent on the Cisco Configuration Engine 1.5, or the other way around.

Downgrading: a certain agent is not available on the device anymore, but the IMGW device is not simulating this agent. The next update will fail.

12.0 -> 12.2

To update an image from 12.0 to 12.2, the image needs to use IMGW to simulate both Configuration Agent and Image Agent.

Procedure


Step 1 Create a template for configuration update. This template only applies to a device when you do a configuration update.

Step 2 Create a template for image activation.

The activation template should include the boot image information. For example, if you want to copy image c837-k9o3y6-mz.122-13.ZH2.bin to flash and run it as the active image, the following CLI commands should be in the active template:

no boot system

boot system flash flash: c837-k9o3y6-mz.122-13.ZH2.bin

Step 3 Create the image for the device:

a. Setup an FTP/TFTP server.

b. Copy the image onto the FTP/TFTP server.

c. Log into the Cisco Configuration Engine 1.5, go to Image Service -> Images -> Create Image.

d. Enter image information on the page or just enter Name and Image Locations on the FTP/TFTP server, then click on Populate to get image information.

e. Click on Create.

f. To verify, go to Image Service -> Images -> View Image, select the image and verify the image information.

Step 4 Create an IMGW device with device hop info. Make sure to select an agent type to simulate both Configuration Agent and Image Agent (see "Adding Non-agent Enabled Devices" section).

Step 5 Update image (see "Updating Device Images" section).

Step 6 To check the updating status, go to Jobs -> Query Job, click Status to check the job status.

Step 7 To see more debug message on the job, go to Log Manager -> View Logs and select the log to view.

Step 8 Now you should have the 12.2 image running on the device. If you want to enable Configuration Agent and Event Agent on the device, put the following CLI commands in device configuration template that you created in Step 1, then do Update Config from Cisco Configuration Engine 1.5:

cns config partial server_ipaddress port

cns event server_ipaddress port

Step 9 To verify, go to the View Device page on Cisco Configuration Engine 1.5. You should be able to see a green indicator next to this device object.



Note In order to use Configuration Agent and Event Agent to do configuration updates, you should delete the IMGW device object since it should never have two sets of the same agent for the device on the Cisco Configuration Engine 1.5.


12.0 -> 12.3(3) or later

To update image from 12.0 to 12.3(3) or later image you need to use IMGW to simulate both Configuration Agent and Image Agent.

The image update procedure is the same as 12.0 -> 12.2 except in Step 9. To enable the image agent on the device, you can also add the following line to the configuration template and update the configuration to the device:

cns image server http://server_ipaddress/cns/HttpMsgDispatcher status http://server_ipaddress/cns/HttpMsgDispatcher


Note In order to use Configuration Agent, Event Agent, and image agent to do configuration and image updates, you should delete the IMGW device object since it should never have two sets of the same agent for a device on the Cisco Configuration Engine 1.5.


12.2 -> 12.3(3) or later

There are two ways to update the image from 12.2 to 12.3(3) or later image:

1. No agents enabled on the device and use IMGW to simulate both Configuration Agent and Image Agent. The procedure is same as update from 12.0 -> 12.2.

2. Enable Event Agent and Configuration Agent on devices to update activation template and use IMGW to simulate image agent only.

Procedure


Step 1 On the device, make sure to enable Configuration Agent with the following commands (it can be done from router command line or from Cisco Configuration Engine 1.5 configuration update):

cns event server_ipaddress prot

cns config partial server_ipaddress prot

Step 2 Repeat the procedure in 12.0 -> 12.2 except in Step 4. When creating the IMGW device, make sure to select Image Agent for Agent Type.

Step 3 To enable the image agent on the device, you can also add the following line to configuration template and update configuration to the device:

cns image server http://server_ipaddress/cns/HttpMsgDispatcher status http://server_ipaddress/cns/HttpMsgDispatcher



Note In order to use Configuration Agent, Event Agent, and Image Agent to do configuration and image updates, you should delete the IMGW device object since it should never have two sets of the same agent for a device on the Cisco Configuration Engine 1.5.


12.3(3) or later -> 12.3(3) or later

Image upgrading from 12.3(3) or later -> 12.3(3) later images can be done with agents enabled on device. There is no need for IMGW.

Procedure


Step 1 On the device, make sure to enable the Configuration Agent with the following commands (it can be done from router command line or from Cisco Configuration Engine 1.5 configuration update):

cns event server_ipaddress prot

cns config partial server_ipaddress prot

cns image server http://server_ipaddress/cns/HttpMsgDispatcher status http://server_ipaddress/cns/HttpMsgDispatcher

Step 2 Create a template for configuration updates.

Step 3 Create a template for image activation.

Step 4 Create an image for device:

a. Setup FTP/TFTP server.

b. Copy image on FTP/TFTP server.

c. Log into the Cisco Configuration Engine 1.5, go to Image Service -> Images -> Create Image.

d. Enter image information on the page or just enter Name and Image Locations on the FTP/TFTP server then click Populate to get image information.

e. Click on Create.

f. To verify, go to Image Service -> Images -> View Image, select the image and verify the image information.

Step 5 Create a device object on Cisco Configuration Engine 1.5 (see "Adding Agent Enabled Devices" section).

Step 6 Update image see "Updating Device Images" section.

Step 7 To check the updating status, go to Jobs -> Query Job, click the Status to check the job status.

Step 8 To see more debug messages on the job, go to Log Manager -> View Logs and select the log to view.


12.3(3) or later -> 12.2

This is the same as upgrading from 12.2 -> 12.3(3) or later images. There are several things that you should check before submitting the update:

If you are using the second option in 12.2->12.3(3), which uses IMGW to simulate only the Image Agent, but not the Configuration Agent and Event Agent, make sure there is only Event Agent and Configuration Agent enabled on the device but no Image Agent; even though it is running 12.3(3) or later image that has all the agents. The IMGW on the server side will simulate the Image Agent.

If there is already a device on the Cisco Configuration Engine 1.5, you only need to add an IMGW device with the same device name as device object on Cisco Configuration Engine 1.5.

Please remove any commands in your configuration template to configuration Image Agent.

12.3(3) or later -> 12.0

Same as upgrading from 12.0 -> 12.3(3) or later image. There are several things that users should check before submit the update:


Step 1 Make sure there is no agent enabled on router even it runs 12.3(3) or later image that has all the agents. The IMGW on server side will simulate both Configuration Agent and Image Agent.

Step 2 If there is already device object on the Cisco Configuration Engine 1.5, users only need to add IMGW device with the same device name as device object on Cisco Configuration Engine 1.5.

Step 3 Please remove them if you have any command in your configuration template to configure Configuration Agent, Event Agent, or Image Agent.