通过 CLI 安装 SONiC OS
Summary: 通过 CLI 安装 SONiC OS
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
前提条件:
指示:
图像列表和状态:检查当前引导的操作系统映像和将在下次重新引导时引导的映像。
设置默认引导映像:更改交换机将在下次引导时使用的操作系统映像。
在 SONiC 中更改默认引导映像所需的步骤到此结束。
如需进一步帮助,请参阅 Dell EMC Enterprise SONiC User Guide Release Documentation (Dell EMC Enterprise SONiC 用户指南)发行文档、Dell SONiC 快速入门指南,或联系 Dell EMC 技术支持。
- 与交换机的活动连接。
- 加载操作系统软件的文件服务器详细信息。HTTP 服务必须可供交换机使用。
指示:
图像列表和状态:检查当前引导的操作系统映像和将在下次重新引导时引导的映像。
- 在 SONiC CLI 提示符处,使用“show image list”命令显示当前处于活动状态的映像以及下次重新启动时将加载的版本。
SONIC# show image list Current: SONiC-OS-4.0.1-Enterprise_Base Next: SONiC-OS-4.0.1-Enterprise_Base Available: SONiC-OS-4.0.1-Enterprise_Base SONIC#
- 使用“image install http://[IP]/[image_name]”命令将新映像安装到 Next: slot 中,以便在下次引导时加载
SONIC# SONIC# image install http://10.0.0.200/SONiC-OS-4.0.3-Enterprise_Base.bin %Info: Check 'show image status' for image install progress. SONIC#
- 要检查映像下载过程的状态,然后检查安装进度,请使用“show image status”命令。
SONIC# show image status ----------------------------------------------------------- Global operation status : GLOBAL_STATE_DOWNLOAD ----------------------------------------------------------- File operation status : TRANSFER_DOWNLOAD File size(bytes) : 959070190 File transfer bytes : 253968384 File progress : 26% Transfer start time : 2023-02-03 20:14:45+0000 Transfer end time : N/A ----------------------------------------------------------- SONIC#
- 几分钟后,再次执行“show image status”命令并验证安装进度。请注意,“Transfer end time”已完成,现在“Installoperation status”部分中有一个额外的“INSTALL_PROGRESS”。
SONIC# show image status ----------------------------------------------------------- Global operation status : GLOBAL_STATE_INSTALL ----------------------------------------------------------- File operation status : TRANSFER_STATE_SUCCESS File size(bytes) : 959070190 File transfer bytes : 959070190 File progress : 100% Transfer start time : 2023-02-03 20:14:45+0000 Transfer end time : 2023-02-03 20:16:02+0000 ----------------------------------------------------------- Install operation status : INSTALL_PROGRESS Install start time : 2023-02-03 20:16:02+0000 Install end time : N/A SONIC#
- 多分钟后,再次执行“show image status”,并记下“INSTALL_STATE_SUCCESS”的完成情况,并更新“Install end time”字段。
SONIC# show image status ----------------------------------------------------------- Global operation status : GLOBAL_STATE_INSTALL ----------------------------------------------------------- File operation status : TRANSFER_STATE_SUCCESS File size(bytes) : 959070190 File transfer bytes : 959070190 File progress : 100% Transfer start time : 2023-02-03 20:14:45+0000 Transfer end time : 2023-02-03 20:16:02+0000 ----------------------------------------------------------- Install operation status : INSTALL_STATE_SUCCESS Install start time : 2023-02-03 20:16:02+0000 Install end time : 2023-02-03 20:18:06+0000 SONIC#
- “show image list”命令将显示将在下次引导时使用新映像。当前映像和新映像将在本地交换机上列出为可用。
SONIC# show image list Current: SONiC-OS-4.0.1-Enterprise_Base Next: SONiC-OS-4.0.3-Enterprise_Base Available: SONiC-OS-4.0.1-Enterprise_Base SONiC-OS-4.0.3-Enterprise_Base SONIC#
设置默认引导映像:更改交换机将在下次引导时使用的操作系统映像。
- 要显示下次重新加载时要设置为引导的映像版本,请使用“show image list”命令。
SONIC# SONIC# show image list Current: SONiC-OS-4.0.1-Enterprise_Base Next: SONiC-OS-4.0.1-Enterprise_Base Available: SONiC-OS-4.0.1-Enterprise_Base SONiC-OS-4.0.3-Enterprise_Base SONIC#
- 要更改交换机将在下次引导时使用的操作系统映像,请使用“image set default [image name]”命令。要确认更改,请再次执行“show image list”命令以验证下次引导的映像。
SONIC# show image list Current: SONiC-OS-4.0.3-Enterprise_Advanced Next: SONiC-OS-4.1.0-Enterprise_Premium Available: SONiC-OS-4.0.3-Enterprise_Advanced SONiC-OS-4.1.0-Enterprise_Premium SONIC# image set-default SONiC-OS-4.0.3-Enterprise_Advanced SONIC# show image list Current: SONiC-OS-4.0.3-Enterprise_Advanced Next: SONiC-OS-4.0.3-Enterprise_Advanced Available: SONiC-OS-4.0.3-Enterprise_Advanced SONiC-OS-4.1.0-Enterprise_Premium SONIC#
在 SONiC 中更改默认引导映像所需的步骤到此结束。
如需进一步帮助,请参阅 Dell EMC Enterprise SONiC User Guide Release Documentation (Dell EMC Enterprise SONiC 用户指南)发行文档、Dell SONiC 快速入门指南,或联系 Dell EMC 技术支持。
Affected Products
Enterprise SONiC DistributionArticle Properties
Article Number: 000213661
Article Type: How To
Last Modified: 06 Dec 2023
Version: 3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.