此产品的文档集力求使用非歧视性语言。在本文档集中,非歧视性语言是指不隐含针对年龄、残障、性别、种族身份、族群身份、性取向、社会经济地位和交叉性的歧视的语言。由于产品软件的用户界面中使用的硬编码语言、基于 RFP 文档使用的语言或引用的第三方产品使用的语言,文档中可能无法确保完全使用非歧视性语言。 深入了解思科如何使用包容性语言。
思科采用人工翻译与机器翻译相结合的方式将此文档翻译成不同语言,希望全球的用户都能通过各自的语言得到支持性的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 Cisco Systems, Inc. 对于翻译的准确性不承担任何责任,并建议您总是参考英文原始文档(已提供链接)。
本文档介绍使用HTTP服务器重新映像Cisco Nexus控制面板节点的步骤,提供清晰的逐步指导,以确保通过远程HTTP托管的映像部署实现标准化和高效的节点重新映像。
本文档不限于特定的软件和硬件版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
当Cisco Nexus控制面板节点由于系统损坏、不支持的更新或无法访问的GUI而发生故障时,管理员可以使用HTTP服务器上托管的ISO重新映像该节点。该过程包括下载Nexus控制面板ISO,将其托管在Web服务器上,并使用CIMC(思科集成管理控制器)通过HTTP映射和启动ISO。这可实现高效的远程节点恢复或重新安装,作为集群恢复的一部分。
要通过HTTP服务器执行ND重新映像,需要执行以下步骤:
步骤1.从Cisco网站下载固件。
打开software.cisco.com/download。
步骤2.访问Nexus控制面板界面并从可用版本选项中选择适当的软件版本(例如3.2(2m))。
例如:
步骤3.将Nexus控制面板软件ISO映像复制到HTTP服务器。
示例:http://x.x.x.x/iso/
步骤4.通过SSH/控制台连接到思科集成管理控制器。
# ssh admin@cimc_ip
其中cimc_ip是CIMC IP地址。
例如:
# ssh admin@x.x.x.x
admin@x.x.x.x's password:
system#
system# scope vmedia
system /vmedia #
将.iso映像映射到HTTP服务器。
system /vmedia # map-www volume_name http://http_server_ip_and_path iso_file_name
其中:
volume_name是卷的名称。
http_server_ip_and_path是HTTP服务器的IP地址和.iso文件位置的路径。
iso_filename是.iso文件的名称。
注意:http_server_ip_and_path与iso_filename之间存在空格。
system /vmedia # map-www apic http://x.x.x.x/iso/ nd-dk9.3.2.2m.iso
Server username: admin
Server password:
Confirm password:
注意:输入凭证并按Enter。
检查映射状态:
system /vmedia # show mappings detail
The Map-Status must be shown as OK.
For Example:
system /vmedia # show mappings detail
Volume apic:
Map-Status: OK
Drive-Type: CD
Remote-Share: http://x.x.x.x/iso/
Remote-File:nd-dk9.3.2.2m.iso
Mount-Type: www
Mount-Options: noauto,username=admin,password=********3
system /vmedia #
如果映射失败或在映射期间出现错误,可以使用unmap命令删除现有映射,然后再次尝试映射。
Server # scope vmedia
Server /vmedia # show mappings
Volume Map-status Drive-type remote-share remote-file mount-type
------ ---------- ------------ ------------------- ------------------- -----------
Huu OK removable http://x.x.x.x/ rhel-server-6.1-x86_6.iso www
Server /vmedia # unmap Huu
Server /vmedia # show mappings
Volume Map-status Drive-type remote-share remote-file mount-type
------ ---------- ------------ ------------------- ------------------- -----------
连接到SOL以监控安装过程:
system /vmedia # connect host
CISCO Serial Over LAN:
Press Ctrl+x to Exit the session
步骤5.从CIMC GUI的KVM控制台重新通电。
Choose Power > Power Cycle System (cold boot) to power cycle the controller.
从SOL控制台:在启动过程中观察屏幕,并准备在适当的时间按F6以进入启动选择菜单。
例如:
您还必须输入BIOS密码。默认密码是password。
在启动选择菜单中,选择Cisco CIMC-Mapped vDVD2.00选项作为一次性启动设备。
步骤6.返回CIMC CLI并监控连接主机的输出。
监控CIMC cli ,当收到以下消息时:要加速安装,请在接下来的10分钟内输入iso url,然后输入带有Nexus控制面板映像的http服务器URL。
Boot000A* UEFI: Cisco CIMC-Mapped vDVD2.00 PciRoot(0x1)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(1,0)/USB(2,0)/Unit(3)/CDROM(1,0x35,0x5597ed)..BO'
+ return 1
+ '[' -n '' ']'
++ mount
++ grep /run/install/repo
++ cut -f 1 -d ' '
++ tr -d '[:digit:]'
++ true
+ usbdevice=
+ mkdir /mnt/usbdata
+ '[' -n '' ']'
+ '[' true = true ']'
+ read_iso_url
+ dmesg --console-off
+ true
+ echo 'To speed up the install, enter iso url. Type '\''skip'\'' to use local media:'
To speed up the install, enter iso url. Type 'skip' to use local media:
+ echo ' Either http://server/path/to/file or nfs:server:/path/to/file are supported'
Either http://server/path/to/file or nfs:server:/path/to/file are supported
+ read -r -p '? ' url
http://x.x.x.x197.204.4/iso/DCApps/ND/nd-dk9.3.2.1i.iso << Enter the http server details >>
+ '[' http://x.x.x.x197.204.4/iso/DCApps/ND/nd-dk9.3.2.1i.iso = skip ']'
+ '[' http://x.x.x.x197.204.4/iso/DCApps/ND/nd-dk9.3.2.1i.iso = '' ']'
+ '[' http = nfs: ']'
+ echo http://x.x.x.x197.204.4/iso/DCApps/ND/nd-dk9.3.2.1i.iso
+ grep -q '\[.*\]'
++ awk -F '/|:' '{print $4}'
+ urlip=x.x.x.x197.204.4
+ '[' -z x.x.x.x197.204.4 ']'
+ break
+ dmesg --console-on
+ '[' -n http://x.x.x.x197.204.4/iso/DCApps/ND/nd-dk9.3.2.1i.iso ']'
+ '[' http://x.x.x.x197.204.4/iso/DCApps/ND/nd-dk9.3.2.1i.iso '!=' skip ']'
+ dmesg --console-of
第 7 步: 输入HTTP URL后,引导过程将继续。
注意:选择static选项,系统将要求您输入接口名称、管理IP地址和网关。
+ set +e
+ configured=0
+ interface=none
+ addr=none
+ gw=none
+ '[' 0 -eq 0 ']'
+ echo 'Configuring network interface'
Configuring network interface
+ echo 'type static, dhcp, bash for a shell to configure networking, or url to re-enter the url: '
type static, dhcp, bash for a shell to configure networking, or url to re-enter the url:
+ read -p '? ' ntype
? static << Enter the static to configure the networking >>
+ case $ntype in
+ configure_static
+ '[' none '!=' none ']'
注意:键入静态后,它将列出CIMC接口,选择正确的接口。如果选择了错误的接口,则丢包率为100%,然后ping尝试三次失败后,它会再次要求选择正确的接口,直到丢包为0。如果您不知道接口,请依次选择所有接口。
例如
+ echo 'Available interfaces'
Available interfaces
+ ls -l /sys/class/net
total 0
lrwxrwxrwx 1 root root 0 Aug 12 03:53 eno5 -> ../../devices/pci0000:40/0000:40:03.1/0000:46:00.0/0000:47:01.0/0000:49:00.0/0000:4a:00.0/0000:4b:00.0/net/eno5
lrwxrwxrwx 1 root root 0 Aug 12 03:53 eno6 -> ../../devices/pci0000:40/0000:40:03.1/0000:46:00.0/0000:47:01.0/0000:49:00.0/0000:4a:00.0/0000:4b:00.1/net/eno6
lrwxrwxrwx 1 root root 0 Aug 12 03:53 enp1s0f0 -> ../../devices/pci0000:00/0000:00:01.1/0000:01:00.0/net/enp1s0f0
lrwxrwxrwx 1 root root 0 Aug 12 03:53 enp1s0f1 -> ../../devices/pci0000:00/0000:00:01.1/0000:01:00.1/net/enp1s0f1
lrwxrwxrwx 1 root root 0 Aug 12 03:51 lo -> ../../devices/virtual/net/lo
+ read -p 'Interface to configure: ' interface
Interface to configure: enp1s0f0 << select the correct interface >>
+ read -p 'address: ' addr
注意:ND-NODE-L4需要格式为enp1s0fX的接口名称,其中X是数字标识符。SE-NODE-G2需要enoX格式,其中X是数字。
第8步: 正确的接口检查。
进入接口后,它将尝试ping http服务器,如果所选接口正确,则数据包丢失必须为0%,并开始从http服务器获取映像。
例如:在进入0%丢包的正确接口后。
Interface to configure: enp1s0f0
+ read -p 'address: ' addr
address: x.x.x.x/24
+ read -p 'gateway: ' gw
gateway:x.x.x.x
+ ip addr add x.x.x.x/24 dev enp1s0f0
+ ip link set enp1s0f0 up
+ ip route add default via x.x.x.x
++ seq 1 6
+ for count in $(seq 1 6)
+ ping -c 1 x.x.x.x
PING x.x.x.x (x.x.x.x): 56 data bytes
---x.x.x.x ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
+ sleep 20
+ for count in $(seq 1 6)
+ ping -c x.x.x.x
PING x.x.x.x (x.x.x.x): 56 data bytes
64 bytes from x.x.x.x : seq=0 ttl=63 time=0.512 ms
---x.x.x.x ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 0.512/0.512/0.512 ms
+ configured=1
+ break
+ '[' 1 -eq 0 ']'
+ set -e
+ tmpiso=/tmp/cdrom.iso
+ echo 'Fetching http://x.x.x.x/iso/DCApps/ND/nd-dk9.3.2.2f.iso to /tmp/cdrom.iso'
Fetching http://x.x.x.x/iso/DCApps/ND/nd-dk9.3.2.2f.iso to /tmp/cdrom.iso >> started fetching the apic image from HTTP server
+ '[' http = nfs: ']'
+ download http://x.x.x.x/iso/DCApps/ND/nd-dk9.3.2.2f.iso /tmp/cdrom.iso
+ local url=http://x.x.x.x/iso/DCApps/ND/nd-dk9.3.2.2f.iso dest=/tmp/cdrom.iso tries=5
+ wget --server-response --no-check-certificate --tries=5 --progress=dot:mega --read-timeout=60 --output-document=/tmp/cdrom.iso.tmp http://x.x.x.x197.204.4/iso/DCApps/ND/nd-dk9.3.2.2f.iso
--2025-08-12 09:39:08-- http://x.x.x.x197.204.4/iso/DCApps/ND/nd-dk9.3.2.2f.iso
Connecting to x.x.x.x:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Tue, 12 Aug 2025 09:39:09 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_wsgi/3.4 Python/2.7.5
Last-Modified: Tue, 10 Jun 2025 06:51:41 GMT
ETag: "2c66bd000-6373220f3b940"
Accept-Ranges: bytes
Content-Length: 11918888960
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/octet-stream
Length: 11918888960 (11G) [application/octet-stream]
Saving to: '/tmp/cdrom.iso.tmp'
如果您选择了错误的接口,则数据包丢失将为100%,在三次尝试ping失败后,它会再次要求选择正确的接口。
例如:在进入错误接口后出现100%的数据包丢失。
+ read -p 'Interface to configure: ' interface
Interface to configure: enp11s0
+ read -p 'address: ' addr
address: x.x.x.x/24
+ read -p 'gateway: ' gw
gateway: x.x.x.x
+ ip addr add x.x.x.x/24 dev enp11s0
+ ip link set enp11s0 up
+ ip route add default via x.x.x.x
++ seq 1 2
+ for count in '$(seq 1 2)'
+ ping -c 1 x.x.x.x
PING x.x.x.x (x.x.x.x) 56(84) bytes of data.
From x.x.x.x icmp_seq=1 Destination Host Unreachable
--- x.x.x.x ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
+ sleep 20
+ for count in '$(seq 1 2)'
+ ping -c 1 x.x.x.x
PING x.x.x.x (x.x.x.x) 56(84) bytes of data.
From x.x.x.x icmp_seq=1 Destination Host Unreachable
--- x.x.x.x ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
+ sleep 20
+ '[' 0 -eq 0 ']'
+ echo 'Configuring network interface'
Configuring network interface
+ echo 'type static, dhcp, bash for a shell to configure networking, or url to re-enter the url: ' <>
type static, dhcp, bash for a shell to configure networking, or url to re-enter the url:
+ read -p '? ' ntype
?
保持监控CIMC CLI并等待约40至50分钟,您将在CLI上获得以下输出。
+ log 'Shutting down Atomix Installer'
+ echo 'Shutting down Atomix Installer'
Shutting down Atomix Installer
+ log 'reboot: Power down'
+ echo 'reboot: Power down'
reboot: Power down
+ sleep 5
+ poweroff
+ ec[ 533.195532] sysrq: Emergency Sync
ho s
[ 533.195563] sysrq: Emergency Sync
[ 533.212106] sysrq: Emergency Sync
[ 533.212117] sysrq: Emergency Remount R/O
[ 533.212189] sysrq: Power Off
[ 533.212226] kvm: exiting hardware virtualization
[ 533.213874] EXT4-fs (sdf1): re-mounted. Opts: (null). Quota mode: none.
[ 533.215431] sd 1:0:0:0: [sdf] Synchronizing SCSI cache
[ 533.215749] EXT4-fs (dm-3): re-mounted. Opts: (null). Quota mode: none.
[ 533.216395] EXT4-fs (dm-1): re-mounted. Opts: (null). Quota mode: none.
[ 533.217221] EXT4-fs (sdf6): re-mounted. Opts: (null). Quota mode: none.
[ 533.217689] EXT4-fs (sdf4): re-mounted. Opts: (null). Quota mode: none.
[ 533.218965] Emergency Remount complete
[ 533.218997] Emergency Sync complete
[ 533.218997] Emergency Sync complete
[ 533.219002] Emergency Sync complete
[ 533.359024] sd 1:0:0:0: [sdf] Stopping disk
+ echo s
+ echo s
+ echo u
+ echo o
+ log 'Nap time'
+ echo 'Nap time'
Nap time
+ true
+ sleep 60
[ 535.571545] megaraid_sas 0000:41:00.0: megasas_disable_intr_fusion is called outbound_intr_mask:0x40000009
[ 535.692202] ACPI: PM: Preparing to enter system sleep state S5
[ 535.706849] reboot: Power down
第9步: 关闭电源后退出SOL
等待,直到您在SOL控制台中看到消息关闭为止,然后按Ctrl和x(Ctrl+x)退出SOL,然后再次登录CIMC并再次更改范围。
(i) Change the scope to virtual media again:
system# scope vmedia
system /vmedia #
(ii) Unmap the .iso image that you mapped in 2.c:
system /vmedia # unmap volume_name
At the Save mapping prompt, enter yes if you want to save the mapping or no if you do not want to save the mapping. For example:
system /vmedia # unmap apic
Save mapping? Enther 'yes' or 'no' to confirm (CTRL-C to cancel) → yes
system /vmedia #
(iii) Connect back to SOL again:
system /vmedia # connect host
关闭电源后,您需要使用KVM重新打开系统电源,然后继续执行后续步骤。
步骤x.x.x.x首次启动设置
[ 274.210045] nd_bootstrap.sh[2628]: INFO[0174] bootDisk: found disk=/dev/sdf bootPart=/dev/sdf4 espPart=/dev/sdf3
[ 274.224041] nd_bootstrap.sh[2628]: INFO[0174] boot devices/filesystems have been mounted
[ 274.236038] nd_bootstrap.sh[2628]: INFO[0174] |12231-start| ["expand-stub.bash" "/boot/efi/EFI/atx-current/kernel.efi"]
[ 274.251228] nd_bootstrap.sh[2628]: INFO[0174] |12231-out | 21870+1 records in
[ 274.262061] nd_bootstrap.sh[2628]: INFO[0174] |12231-out | 21870+1 records out
[ 274.272065] nd_bootstrap.sh[2628]: INFO[0174] |12231-out | 11197856 bytes (11 MB, 11 MiB) copied, 0.0716082 s, 156 MB/s
[ 274.287060] nd_bootstrap.sh[2628]: INFO[0174] |12231-out | 0+1 records in
[ 274.297060] nd_bootstrap.sh[2628]: INFO[0174] |12231-out | 0+1 records out
[ 274.307049] nd_bootstrap.sh[2628]: INFO[0174] |12231-out | 187 bytes copied, 7.2325e-05 s, 2.6 MB/s
[ 274.566030] nd_bootstrap.sh[2628]: INFO[0175] |12231-out | 102375+1 records in
[ 274.576055] nd_bootstrap.sh[2628]: INFO[0175] |12231-out | 102375+1 records out
[ 274.588059] nd_bootstrap.sh[2628]: INFO[0175] |12231-out | 52416297 bytes (52 MB, 50 MiB) copied, 0.329377 s, 159 MB/s
[ 274.604075] nd_bootstrap.sh[2628]: INFO[0175] |12231-out | 0+1 records in
[ OK ] Finished atomix-boot-setup.
[ 274.615055] nd_bootstrap.sh[2628]: INFO[0175] |12231-out | 0+1 records out
Starting Initial cloud-init job (pre-networking)...
[ 274.634046] nd_bootstrap.sh[2628]: INFO[0175] |12231-out | 82 bytes copied, 9.4287e-05 s, 870 kB/s
[ 274.656064] nd_bootstrap.sh[2628]: INFO[0175] |12231-exit | rc=0
[ 274.666047] nd_bootstrap.sh[2628]: INFO[0175] Boot() duration=175321
[ 274.837851] cloud-init[12253]: Cloud-init v. 24.1.3-0ubuntu1~22.04.5 running 'init-local' at Tue, 12 Aug 2025 09:53:39 +0000. Up 274.82 seconds.
Press any key to run first-boot setup on this console...
Starting Nexus Dashboard setup utility
Welcome to Nexus Dashboard 3.2.2f
Press Enter to manually bootstrap your first master node..
步骤11.配置Nexus Dashboard管理接口的管理员密码和管理网络
Starting Nexus Dashboard setup utility
Welcome to Nexus Dashboard 3.2.2f
Press Enter to manually bootstrap your first master node...
Admin Password:
Reenter Admin Password:
Management Network:
IP Address/Mask: x.x.x.x/24
Gateway: x.x.x.x
重新输入config?(y/N):n
System configured successfully
Initializing System on first boot. Please wait..
[ OK ] Listening on Network Service Netlink Socket.
[ OK ] Finished Initial cloud-init job (pre-networking).
[ OK ] Reached target Preparation for Network.
Starting Network Configuration...
[ OK ] Started Network Configuration.
[ OK ] Reached target Network.
Starting Wait for Network to be Configured...
步骤12. Nexus控制面板节点已准备好登录。您可以使用管理界面IP登录至ND GUI进行其余配置
从控制台:
Ubuntu 22.04.4 LTS localhost ttyS0
# # #### # # # # ##### ##### # ##### # # ##### ### # ##### #####
# # # # # # # # # # # # # # # # # # # # # # # # # #
# # # ### # # # ##### # # ##### ##### ##### ##### # # ##### ##### # #
# # # # # # # # # # # # # # # # # # # # # # # # #
# # #### # # #### ##### ##### # # ##### # # ##### ### # # # # #####
System initialized successfully
[ 564.309561] cloud-init[12560]: Cloud-init v. 24.1.3-0ubuntu1~22.04.5 running 'modules:final' at Tue, 12 Aug 2025 09:58:28 +0000. Up 564.27 seconds.
ci-info: no authorized SSH keys fingerprints found for user ubuntu.
<14>Aug 12 09:58:29 cloud-init: #############################################################
<14>Aug 12 09:58:29 cloud-init: -----BEGIN SSH HOST KEY FINGERPRINTS-----
<14>Aug 12 09:58:29 cloud-init: 256 SHA256:vKu7Zj3MAP+vFOXaeW14HClEhAwrSpA9AqcUC4SZVlU root@localhost (ECDSA)
<14>Aug 12 09:58:29 cloud-init: 256 SHA256:I7eiUnQq6pZsoFPy+UxIUQ66jQOgHyG4zGuF6cAtSl0 root@localhost (ED25519)
<14>Aug 12 09:58:29 cloud-init: 3072 SHA256:SvodRIEgWzEAaQQdH2rlw0qLziBbv0e88VAGkt/ox14 root@localhost (RSA)
<14>Aug 12 09:58:29 cloud-init: -----END SSH HOST KEY FINGERPRINTS-----
<14>Aug 12 09:58:29 cloud-init: #############################################################
-----BEGIN SSH HOST KEY KEYS-----
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBf9S1BXcR48cWcIKhvfjLGYufJgycGIf1Yx8OpRsk4e1I+y80J/x5dfX90h+3cwt9kjH8IubMpleK66mlW+xd0= root@localhost
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGWTN7hoB2/dYSVA0gpV88FWh2iRD2hwJ2LMryhhhQHg root@localhost
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCeM+In/dciDwCKEPLV/97oIA5pHHRBRf0Lij5NcUwzYAf9q/m/lUsdzv2zVYc4WAJd8uX9ZxDAGa9D358Tvxh/lKzBKqNQpQdAjyby6IGGui+UK9Mq1RVxoUkFtIIJ97IzaBoR9ScnucMXpu5mp5OAjws+VrUhKk1XNFAui1QgW507I0Xk+2AaR/W0rwJCQRsHx3orDxCwJkDQDiQQAf/SrvSnuAe/8pSuCuvscqPjZeIF7LnJ6dAms0XXrhbxRQ8c4q/Ud6RL2sKjinlZPfqsbVFSpjbJ9m4jtXvuGE5llyJbS1FcU8DsFbkY6HH9JQru49iXcd5mKt7fyPg0ypp7Hl+2g07mEcYlEMBXxNZw+HqNW27xp0ZkRfWO+Zl2t0s6DjM0LHWqV0wZLYqqBTlQIkhf2irM6mr7s2bVAcvEsuZzG9d7uY8aC/CR5GwkgKW8s4oI7m56ccdRPHV0qQFXnBybBToUInmIK+1fxtaUXYbQbQ83wxNOvG7O55gDsws= root@localhost
-----END SSH HOST KEY KEYS-----
[ 564.364630] cloud-init[12560]: Cloud-init v. 24.1.3-0ubuntu1~22.04.5 finished at Tue, 12 Aug 2025 09:58:29 +0000. Datasource DataSourceAtomix [sources=/var/lib/cloud/seed/atomix][dsmode=net]. Up 564.36 seconds
Please wait for system to boot : [########################################] 100%
System up, please wait for UI to be online.
System UI online, please login to https://x.x.x.x to continue. << Access the Nexus Dashboard GUI via this URL >>
Ubuntu 22.04.4 LTS localhost ttyS0
localhost login:
从KVM:
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
29-Aug-2025
|
初始版本 |