升级 NFX 设备上的 Junos OS
要在 NFX150、NFX250 NextGen 和 NFX350 设备上升级 Junos OS 版本:
-
从 下载 页面将软件包下载到 NFX 设备上的 /var/public 目录。
-
验证设备上当前安装的 Junos OS 版本。NFX250 NextGen 的以下示例输出显示设备上安装了 Junos OS 22.3R2.12 版。
user@host> show version root@host> show version Hostname: host Model: nfx250 Junos: 22.3R2.12 JUNOS OS Kernel 64-bit [20221212.98a33a0_builder_stable_12_223] JUNOS OS libs [20221212.98a33a0_builder_stable_12_223] JUNOS OS runtime [20221212.98a33a0_builder_stable_12_223] JUNOS OS time zone information [20221212.98a33a0_builder_stable_12_223] JUNOS network stack and utilities [20230223.221505_builder_junos_223_r2] JUNOS libs [20230223.221505_builder_junos_223_r2] JUNOS OS libs compat32 [20221212.98a33a0_builder_stable_12_223] JUNOS OS 32-bit compatibility [20221212.98a33a0_builder_stable_12_223] JUNOS libs compat32 [20230223.221505_builder_junos_223_r2] JUNOS runtime [20230223.221505_builder_junos_223_r2] JUNOS Packet Forwarding Engine Simulation Package [20230223.221505_builder_junos_223_r2] JUNOS sflow mx [20230223.221505_builder_junos_223_r2] JUNOS py extensions [20230223.221505_builder_junos_223_r2] JUNOS py base [20230223.221505_builder_junos_223_r2] JUNOS OS vmguest [20221212.98a33a0_builder_stable_12_223] JUNOS OS package [20230213.192558_builder_stable_12] JUNOS OS crypto [20221212.98a33a0_builder_stable_12_223] JUNOS OS boot-ve files [20221212.98a33a0_builder_stable_12_223] JUNOS na telemetry [22.3R2.12] JUNOS Wireless WAN Module [20230223.221505_builder_junos_223_r2]
您可以使用
show vmhost version detail
命令查看磁盘分区上安装的 Junos OS 版本。请注意,NFX150 和 NFX250 NextGen 具有具有两个分区的单个磁盘,而 NFX350 具有提供四个分区的双磁盘。下面是 NFX250 NextGen 设备的示例输出。您会注意到主分区是活动分区。
user@host> show vmhost version detail Partition set : primary Software version : 22.3R2.12 Host kernel release : 4.1.27-rt30-WR8.0.0.34_ovp Host kernel version : #1 SMP Sun Dec 4 22:30:10 PST 2022 Partition set : primary Software version : 22.3R2.12 Installed/Upgraded at : Tue Feb 28 10:12:50 UTC 2023 Status : Boot success Partition set : alternate Software version : 22.3R2.12 Installed/Upgraded at : Tue Feb 28 10:17:48 UTC 2023 Status : Factory installation setup complete, ready for boot
-
使用
request vmhost software
命令升级 Junos OS。user@host> request vmhost software add /var/public/jinstall-host-nfx-3-x86-64-22.4R2.1-secure-signed.tgz Verified jinstall-host-nfx-3-x86-64-22.4R2.1-secure-signed signed by PackageProductionECP256_2023 method ECDSA256+SHA256 Pushing Junos image package to the host... File already present in Host. Skipping pushing the image Mounting alternate partitions to stage upgrade operation Installing /var/tmp/preinstall/install-media-nfx-3-junos-22.4R2.1-secure.tgz Extracting the package ... Validate linux image... upgrade_platform: ------------------- upgrade_platform: Parameters passed: upgrade_platform: silent=0 upgrade_platform: package=/var/tmp/tmp.27UZct4newjunos_cli_upg/jinstall-nfx-3-junos-22.4R2.1-secure-linux.tgz upgrade_platform: clean install=0 upgrade_platform: Need reboot after staging=1 upgrade_platform: ------------------- upgrade_platform: upgrade_platform: Checking input /var/tmp/tmp.27UZct4newjunos_cli_upg/jinstall-nfx-3-junos-22.4R2.1-secure-linux.tgz ... upgrade_platform: Input package /var/tmp/tmp.27UZct4newjunos_cli_upg/jinstall-nfx-3-junos-22.4R2.1-secure-linux.tgz is valid. Secure Boot is enforced. ALLOW:usr/secureboot/grub/BOOTX64.EFI ALLOW:boot/bzImage-intel-x86-64.bin ALLOW:boot/initramfs.cpio.gz Setting up Junos host applications for installation ... Installing Host OS ... upgrade_platform: ------------------- upgrade_platform: Parameters passed: upgrade_platform: silent=0 upgrade_platform: package=/var/tmp/tmp.27UZct4newjunos_cli_upg/jinstall-nfx-3-junos-22.4R2.1-secure-linux.tgz upgrade_platform: clean install=0 upgrade_platform: Need reboot after staging=0 upgrade_platform: ------------------- upgrade_platform: upgrade_platform: Checking input /var/tmp/tmp.27UZct4newjunos_cli_upg/jinstall-nfx-3-junos-22.4R2.1-secure-linux.tgz ... upgrade_platform: Input package /var/tmp/tmp.27UZct4newjunos_cli_upg/jinstall-nfx-3-junos-22.4R2.1-secure-linux.tgz is valid. Secure Boot is enforced. ALLOW:usr/secureboot/grub/BOOTX64.EFI ALLOW:boot/bzImage-intel-x86-64.bin ALLOW:boot/initramfs.cpio.gz upgrade_platform: Backing up boot assets.. upgrade_platform: Staging the upgrade package - /var/tmp/tmp.27UZct4newjunos_cli_upg/jinstall-nfx-3-junos-22.4R2.1-secure-linux.tgz.. upgrade_platform: Checksum verified and OK... Setting up boot environment ... Setting up boot environment completed upgrade_platform: Staging of /var/tmp/tmp.27UZct4newjunos_cli_upg/jinstall-nfx-3-junos-22.4R2.1-secure-linux.tgz completed upgrade_platform: System needs *REBOOT* to complete the upgrade Host OS upgrade staged. Reboot the system to complete installation!
如果现在运行命令
show vmhost version
,您会注意到软件版本仍显示 22.3R2.12。请注意,备用分区的状态表示新的 Junos OS 版本已在备用分区上暂存。root@host> show vmhost version detail | no-more Partition set : primary Software version : 22.3R2.12 Host kernel release : 4.1.27-rt30-WR8.0.0.34_ovp Host kernel version : #1 SMP Sun Dec 4 22:30:10 PST 2022 Reboot is pending for a software upgrade Partition set : primary Software version : 22.3R2.12 Installed/Upgraded at : Tue Feb 28 10:12:50 UTC 2023 Status : Boot success Partition set : alternate Software version : 22.3R2.12 Installed/Upgraded at : Tue Feb 28 10:17:48 UTC 2023 Status : Software upgrade staged, boot to partition-set pending
-
重新启动设备以在设备上加载新版本的 Junos OS。
root@host> request vmhost reboot Reboot the vmhost ? [yes,no] (no) yes Initiating vmhost reboot... root@host> show version Hostname: host Model: nfx250_att_ls1_10_t Junos: 22.4R2.1 JUNOS OS Kernel 64-bit [20230213.5295c32_builder_stable_12_224] JUNOS OS libs [20230213.5295c32_builder_stable_12_224] JUNOS OS runtime [20230213.5295c32_builder_stable_12_224] JUNOS OS time zone information [20230213.5295c32_builder_stable_12_224] JUNOS network stack and utilities [20230301.213842_builder_junos_224_r2] JUNOS libs [20230301.213842_builder_junos_224_r2] JUNOS OS libs compat32 [20230213.5295c32_builder_stable_12_224] JUNOS OS 32-bit compatibility [20230213.5295c32_builder_stable_12_224] JUNOS libs compat32 [20230301.213842_builder_junos_224_r2] JUNOS runtime [20230301.213842_builder_junos_224_r2] JUNOS Packet Forwarding Engine Simulation Package [20230301.213842_builder_junos_224_r2] JUNOS sflow mx [20230301.213842_builder_junos_224_r2] JUNOS py extensions [20230301.213842_builder_junos_224_r2] JUNOS py base [20230301.213842_builder_junos_224_r2] JUNOS OS vmguest [20230213.5295c32_builder_stable_12_224] JUNOS OS package [20230213.192558_builder_stable_12] JUNOS OS crypto [20230213.5295c32_builder_stable_12_224] JUNOS OS boot-ve files [20230213.5295c32_builder_stable_12_224] JUNOS na telemetry [22.4R2.1]
-
设备重新启动后,验证磁盘分区的状态。以下输出显示备用分区上的映像已升级。备用分区现在是活动分区。
root@host> show vmhost version detail Partition set : alternate Software version : 22.4R2.1 Host kernel release : 4.1.27-rt30-WR8.0.0.34_ovp Host kernel version : #1 SMP Mon Feb 27 04:48:57 PST 2023 Partition set : primary Software version : 22.3R2.12 Installed/Upgraded at : Tue Feb 28 10:12:50 UTC 2023 Status : Boot success Partition set : alternate Software version : 22.4R2.1 Installed/Upgraded at : Tue Mar 7 16:05:24 UTC 2023 Status : Boot success
要将所有磁盘分区上的版本升级到相同版本,请参阅 升级 NFX250 NextGen 和 NFX350 设备上的双磁盘分区。