05-01-2022 09:22 AM - edited 05-01-2022 09:23 AM
Hello guys,
I am working/testing on ftp an IOS update to our 891fs and 892s. We currently use EEM for things like interface IP updates and erasing NVRAM and they work great. I have hit a wall, I am not sure what is going wrong with my script. I have tried several variations and it does seem to work. Any help would be appreciated. Here are variations I have tried:
conf t
event manager applet IOS_Update
event none
action 1.0 cli command "enable"
action 2.0 cli command "copy ftp://ffong:password@10.90.0.46/cisco/c800-universalk9-mz.SPA.154-3.M6a.bin flash:"
action 3.0 cli command "config t"
action 4.0 cli command "boot system flash c890-universalk9-mz.157-3.M4a.bin"
action 5.0 cli command "end"
action 5.0 cli command "wr"
action 6.0 cli command "end"
action 9999 cli command "q"
end
wr
----------------------------------------------------------------------------------------------------
conf t
event manager applet IOS_Update authorization bypass
event timer absolute time 3600
action 1.0 cli command "enable"
action 2.0 cli command "copy ftp://ffong:password@10.90.0.46/cisco/c800-universalk9-mz.SPA.157-3.M4a.bin flash:"
action 3.0 cli command "wr"
action 9999 cli command "end"
end
wr
-----------------------------------------------------------------------------------------------------
conf t
event manager applet IOS_Update authorization bypass
event timer absolute time 3600
action 0.1 cli command "enable"
action 1.1 cli command "copy ftp://ffong:password@10.90.0.46/cisco/c800-universalk9-mz.SPA.157-3.M4a.bin flash:"
end
wr
05-01-2022 12:22 PM - edited 05-01-2022 12:23 PM
conf t event manager applet IOS_Update event none action 1.0 cli command "enable" action 2.0 cli command "copy ftp://ffong:password@10.90.0.46/cisco/c800-universalk9-mz.SPA.154-3.M6a.bin flash:" action 3.0 cli command "config t" action 4.0 cli command "boot system flash c890-universalk9-mz.157-3.M4a.bin" action 5.0 cli command "end" action 5.0 cli command "wr" action 6.0 cli command "end" action 9999 cli command "q" end wr
The one you copy and one you booting does not match.
you also need to do
no boot system flash c890-universalk9-mz.XXXXXXXXXXXXX (this is exiting one)
boot system flash c890-universalk9-mz.157-3.M4a.bin
wr and reload should work
Note: most of the my upgrade out of the box scripting, has never done using EEM, but it should work
05-01-2022 04:02 PM
I do not understand what is the requirement to make this very complicated and do not "re-invent" the wheel.
This entire process can easily be done in Notepad:
1. Copy the IOS into the router
2. Change the boot variable string.
3. Save the config
4. Reboot the router.
Keep it simple.
05-03-2022 09:28 AM
Thank you guys, yes I apologize on the EEM, I do have the right one for action 2 and 4, I just copied the wrong one here. We are trying to push this to 3K+ devices and doing it manually is not a real option right now.
conf t event manager applet IOS_Update event none action 1.0 cli command "enable" action 2.0 cli command "copy ftp://ffong:password@10.90.0.46/cisco/c890-universalk9-mz.157-3.M4a.bin flash:" action 3.0 cli command "config t" action 4.0 cli command "boot system flash c890-universalk9-mz.157-3.M4a.bin" action 5.0 cli command "end" action 5.0 cli command "wr" action 6.0 cli command "end" action 9999 cli command "q" end wr
05-03-2022 02:21 PM
The EEM is going to be copy-n-pasted into the router, right?
Try this in a Notepad:
conf t
no boot system flash flash:
boot system flash flash:c890-universalk9-mz.157-3.M4a.bin
end
wr
copy
copy ftp://ffong:password@10.90.0.46/cisco/c890-universalk9-mz.157-3.M4a.bin flash:
Be aware that comparing the MD5 hash is not being performed either EEM or the method above.
05-03-2022 02:36 PM
Thank you, it will be sent on mass via an ftp server not copied individuality.
05-04-2022 12:20 AM
If you have Server which is pushing this config, you can use same device to upgrade also for teh devices.(rather using EEM ?)
until you wan to do that with EEM only ? i do upgrade switch using scripting outof the box. it works, just test couple of device, is the process works as expected before you doing mass level ?
05-02-2022 05:54 AM
Thank you guys, yes I apologize on the EEM, I do have the right one for action 2 and 4, I just copied the wrong one here. We are trying to push this to 3K+ devices and doing it manually is not a real option right now.
conf t event manager applet IOS_Update event none action 1.0 cli command "enable" action 2.0 cli command "copy ftp://ffong:password@10.90.0.46/cisco/c890-universalk9-mz.157-3.M4a.bin flash:" action 3.0 cli command "config t" action 4.0 cli command "boot system flash c890-universalk9-mz.157-3.M4a.bin" action 5.0 cli command "end" action 5.0 cli command "wr" action 6.0 cli command "end" action 9999 cli command "q" end wr
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide