CISCO 8000 Software Upgrade Method 1(install command)

Upgrade Method

Cisco 8000升级方式和其他XR产品类似可大致分为三类:

  • USB re-image
  • PXE re-image
  • Install command (本文log一下用install command 升级的过程)

准备工作

下载安装包,以及optional RPM包。并copy到设备主引擎harddisk: 中。

RP/0/RP0/CPU0:ios#dir harddisk: 
Wed Jan 20 06:45:46.006 UTC

Directory of harddisk:
     15 -rw-r--r--. 1    737280 Jan 20 06:44 8000-optional-rpms.7.0.14.tar     <<<<
 524289 drwxrwxrwx. 2      4096 Jan 20 05:00 dumper
     13 -rw-r--r--. 1 987228160 Jan 20 05:53 8000-x64-7.0.14.iso            <<<
     14 -rw-r--r--. 1   1003520 Jan 20 06:44 8000-k9sec-rpms.7.0.14.tar       <<<<
3407873 drwxr-xr-x. 2      4096 Jan 20 05:00 showtech
     11 drwx------. 2     16384 Jan 20 04:49 lost+found
1310721 drwx------. 3      4096 Jan 20 04:58 ima
3670017 drwxrwxrwx. 5      4096 Jan 20 05:25 cisco_support
 655361 drwxr-xr-x. 3      4096 Jan 20 05:00 pam
2883585 drwxrwxrwx. 2      4096 Jan 20 04:54 shutdown
     12 -rw-rw-rw-. 1        31 Jan 20 04:54 debug_shell_client.log
 262145 drwxrwxrwx. 2      4096 Jan 20 04:55 .sppdc
3932161 drwxrwxrwx. 2      4096 Jan 20 04:54 nvram

如上所示, ISO包中已经包含了一些基础的功能包,如BGP ISIS OSPF, 还有些存在于 optional 的tar包中。

Install Replace(iso) ******

Command

#install package replace harddisk:/8000-x64-7.0.14.iso synchronous 
or
#install replace harddisk:/8000-x64-7.0.14.iso synchronous 

//install package replace VS install replace
install replace 在安装完ISO文件后直接重启完成更新, 好处就是不用输入“install apply”让设备重启了, 但是这样做你就无法安装其他功能包, 只能在重启后继续安装功能包,另外install replace 命令多用于用gISO升级, 因为在制作gISO的时候会将所有的rpm压进去,install replace 直接升级重启设备就行。

RP/0/RP1/CPU0:8808#    install replace /harddisk:/8000-x64-7.0.14.iso synchron$
Wed Jan 20 03:58:26.400 UTC
Once the packaging dependencies have been determined, the install operation may have to reload the system.      <<<<<<<<<
If you want to control the timing of system reload, you must not continue, but use the 'install package replace' command instead, followed by 'install apply'.
Continue? [yes/no]:[yes] no

LOG

RP/0/RP0/CPU0:ios#show platform 
Wed Jan 20 06:23:35.956 UTC
Node              Type                     State                    Config state
--------------------------------------------------------------------------------
0/RP0/CPU0        8201-SYS(Active)         IOS XR RUN               NSHUT
0/RP0/BMC0        8201-SYS                 OPERATIONAL              NSHUT
0/PM0             PSU2KW-ACPE              OPERATIONAL              NSHUT
0/PM1             PSU2KW-ACPE              OPERATIONAL              NSHUT
0/FT0             FAN-1RU-PE               OPERATIONAL              NSHUT
0/FT1             FAN-1RU-PE               OPERATIONAL              NSHUT
0/FT2             FAN-1RU-PE               OPERATIONAL              NSHUT
0/FT3             FAN-1RU-PE               OPERATIONAL              NSHUT
0/FT4             FAN-1RU-PE               OPERATIONAL              NSHUT
RP/0/RP0/CPU0:ios#show install active summary 
Wed Jan 20 06:23:38.941 UTC
Active Packages:    XR: 171    All: 1188
Label:              7.0.12
Software Hash:      38bad736984debbde3000e25d64c8071

Optional Packages                                                        Version
---------------------------------------------------- ---------------------------
xr-8000-mcast                                                     7.0.12v1.0.0-1
xr-8000-netflow                                                   7.0.12v1.0.0-1
xr-bgp                                                            7.0.12v1.0.0-1
xr-cdp                                                            7.0.12v1.0.0-1
xr-eigrp                                                          7.0.12v1.0.0-1
xr-healthcheck                                                    7.0.12v1.0.0-1
xr-ipsla                                                          7.0.12v1.0.0-1
xr-is-is                                                          7.0.12v1.0.0-1
xr-lldp                                                           7.0.12v1.0.0-1
xr-mcast                                                          7.0.12v1.0.0-1
xr-mpls-oam                                                       7.0.12v1.0.0-1
xr-netflow                                                        7.0.12v1.0.0-1
xr-ospf                                                           7.0.12v1.0.0-1
xr-perfmgmt                                                       7.0.12v1.0.0-1
xr-rip                                                            7.0.12v1.0.0-1
xr-telnet                                                         7.0.12v1.0.0-1
xr-track                                                          7.0.12v1.0.0-1
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#install package re
remove  replace  
RP/0/RP0/CPU0:ios#install package replace harddisk:/8000-x64-7.0.14.iso synchronous 
Wed Jan 20 06:24:03.218 UTC
Starting:
  install package replace /harddisk:/8000-x64-7.0.14.iso
Packaging operation 1.1.1
The install operation will continue in the background
Press Ctrl-C to return to the exec prompt. This will not cancel the install operation

Current activity: Initializing ...
Current activity: Veto check .............. ..
Current activity: Package add or other package operation ............ 
..................... ..............

Packaging operation 1.1.1: 'install package replace /harddisk:/8000-x64-7.0.14.iso' completed without error
Exception in thread Thread-1:
Traceback (most recent call last):
  File "tools/python3/shared/obj-x86_64-thinxr/python_tree/cpython/Lib/threading.py", line 914, in _bootstrap_inner
  File "tools/python3/shared/obj-x86_64-thinxr/python_tree/cpython/Lib/threading.py", line 862, in run
  File "infra/install/src/_xrinstall/_inotify.py", line 197, in _wait_for_subproc
  File "infra/install/src/_xrinstall/_inotify.py", line 267, in stop
  File "infra/install/src/_xrinstall/_inotify.py", line 207, in _kill_proc
AttributeError: 'NoneType' object has no attribute 'terminate'

RP/0/RP0/CPU0:ios#   
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#show install request 
Wed Jan 20 06:36:09.506 UTC

User request: install package replace /harddisk:/8000-x64-7.0.14.iso
Operation ID: 1.1.1
State:        Success since 2021-01-20 06:35:42 UTC

Current activity:    Await user input
Time started:        2021-01-20 06:35:42

The following actions are available:
    install package add
    install package remove
    install package upgrade
    install package downgrade
    install package replace
    install package rollback
    install package abort latest
    install package abort all-since-apply
    install apply reload

Install add option rpm packet ******

安装optional的rpm包的时候有三种方法:

  • On Box Directory(使用本地路径的方式)
  • Local Repository
  • Remote Repository
On Box Directory
RP/0/RP0/CPU0:P1#install source /harddisk:/TELNET xr-telnet-7.0.1.131Sv1.0.0-1.x86_64.rpm
Remote Repository

这里以centos为例子, 创建一个remote repo:

//Centos
[root@xuxing239 ~]# yum -y install httpd createrepo
[root@xuxing239 ~]# systemctl start httpd

//将你的rpm包解压缩后放到路径:/var/www/html/下

[root@xuxing239 ~]# createrepo --database /var/www/html/
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@xuxing239 ~]# 

//Cisco 8000 remove repo 配置:

RP/0/RP0/CPU0:ios#show run install
install
repository REPO
url http://6.2.41.10

Local repository ****
RP/0/RP0/CPU0:ios#run
Wed Jan 20 06:45:58.984 UTC
[node0_RP0_CPU0:~]$cd /harddisk\:
[node0_RP0_CPU0:/harddisk:]$mkdir repo 
[node0_RP0_CPU0:/harddisk:]$
[node0_RP0_CPU0:/harddisk:]$
[node0_RP0_CPU0:/harddisk:]$mv 8000-optional-rpms.7.0.14.tar repo/
[node0_RP0_CPU0:/harddisk:]$mv 8000-k9sec-rpms.7.0.14.tar repo/
[node0_RP0_CPU0:/harddisk:]$
[node0_RP0_CPU0:/harddisk:]$
[node0_RP0_CPU0:/harddisk:]$cd repo/
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$ls
8000-k9sec-rpms.7.0.14.tar  8000-optional-rpms.7.0.14.tar
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$tar -xvf 8000-k9sec-rpms.7.0.14.tar
optional-rpms/k9sec/
optional-rpms/k9sec/xr-k9sec-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/k9sec/xr-k9sec-7dee261fe41a15d8-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/k9sec/xr-k9sec-8201-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/k9sec/xr-k9sec-8202-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/k9sec/xr-k9sec-8800-lc-36fh-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/k9sec/xr-k9sec-8800-lc-48h-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/k9sec/xr-k9sec-8800-rp-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/k9sec/xr-k9sec-c1d82c6c34a39c33-7.0.14v1.0.0-1.x86_64.rpm
[node0_RP0_CPU0:/harddisk:/repo]$tar -xvf 8000-optional-rpms.7.0.14.tar
optional-rpms/cdp/
optional-rpms/cdp/xr-cdp-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/cdp/xr-cdp-7dee261fe41a15d8-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/cdp/xr-cdp-8201-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/cdp/xr-cdp-8202-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/cdp/xr-cdp-8800-lc-36fh-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/cdp/xr-cdp-8800-lc-48h-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/cdp/xr-cdp-8800-rp-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/cdp/xr-cdp-c1d82c6c34a39c33-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/cdp/xr-cdp-fbaabb7554875ebc-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/healthcheck/
optional-rpms/healthcheck/xr-healthcheck-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/healthcheck/xr-healthcheck-7dee261fe41a15d8-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/healthcheck/xr-healthcheck-8201-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/healthcheck/xr-healthcheck-8202-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/healthcheck/xr-healthcheck-8800-lc-36fh-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/healthcheck/xr-healthcheck-8800-lc-48h-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/healthcheck/xr-healthcheck-8800-rp-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/healthcheck/xr-healthcheck-c1d82c6c34a39c33-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/telnet/
optional-rpms/telnet/xr-telnet-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/telnet/xr-telnet-7dee261fe41a15d8-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/telnet/xr-telnet-8201-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/telnet/xr-telnet-8202-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/telnet/xr-telnet-8800-lc-36fh-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/telnet/xr-telnet-8800-lc-48h-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/telnet/xr-telnet-8800-rp-7.0.14v1.0.0-1.x86_64.rpm
optional-rpms/telnet/xr-telnet-c1d82c6c34a39c33-7.0.14v1.0.0-1.x86_64.rpm
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$ls
8000-k9sec-rpms.7.0.14.tar  8000-optional-rpms.7.0.14.tar  optional-rpms
[node0_RP0_CPU0:/harddisk:/repo]$rm -rf 8000-k9sec-rpms.7.0.14.tar 
[node0_RP0_CPU0:/harddisk:/repo]$rm -rf 8000-optional-rpms.7.0.14.tar 
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$
[node0_RP0_CPU0:/harddisk:/repo]$exit
logout

RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#conf 
Wed Jan 20 06:48:17.088 UTC
RP/0/RP0/CPU0:ios(config)#install
RP/0/RP0/CPU0:ios(config-install)# repository local-repo
RP/0/RP0/CPU0:ios(config-repository)#  url file:///harddisk:/repo
RP/0/RP0/CPU0:ios(config-repository)# !
RP/0/RP0/CPU0:ios(config-repository)#
RP/0/RP0/CPU0:ios(config-repository)#
RP/0/RP0/CPU0:ios(config-repository)#commit 
Wed Jan 20 06:48:20.909 UTC
RP/0/RP0/CPU0:ios(config-repository)#
RP/0/RP0/CPU0:ios#show install available  | in local-repo     <<<< check repo packet  
Wed Jan 20 06:49:47.431 UTC
xr-cdp                                               x86_64                        7.0.14v1.0.0-1 local-repo                                
xr-healthcheck                                       x86_64                        7.0.14v1.0.0-1 local-repo                                
xr-k9sec                                             x86_64                        7.0.14v1.0.0-1 local-repo                                
xr-telnet                                            x86_64                        7.0.14v1.0.0-1 local-repo                                
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#install package add xr-cdp xr-healthcheck  xr-k9sec  xr-telnet  synchronous 
Wed Jan 20 06:50:12.608 UTC
Starting:
  install package add xr-cdp xr-healthcheck xr-k9sec xr-telnet
Packaging operation 1.1.2
The install operation will continue in the background
Press Ctrl-C to return to the exec prompt. This will not cancel the install operation

Current activity: Initializing
Current activity: Veto check ..
Current activity: Package add or other package operation .

Packaging operation 1.1.2: 'install package add xr-cdp xr-healthcheck xr-k9sec xr-telnet' completed without error

Install apply | install commit

RP/0/RP0/CPU0:ios#install apply
Wed Jan 20 06:51:47.581 UTC
This install operation will reload the system.
Continue? [yes/no]:[yes] yes
Install apply operation has started
Install operation will continue in the background
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#RP/0/RP0/CPU0:Jan 20 06:52:03.782 UTC: instorch[153]: %INFRA-INSTALL-2-SYSTEM_RELOAD : As part of an install operation, a full system reload will take place in order to apply the installed software. 

Preparing system for backup. This may take a few minutes especially for large configurations.
        Status report: node0_RP0_CPU0: BACKUP INPROGRESS 
        Status report: node0_RP0_CPU0: BACKUP HAS COMPLETED SUCCESSFULLY 
[Done]




//重启结束后install commit

参考

Software Installation Guide for Cisco 8000 Series Routers, IOS XR Release 7.0.x

Cisco_8000_Series_Upgrade_MOP_7014.pdf

           

No comments

Comments feed for this article

Reply

Your email address will not be published.