- Table of Contents
-
- 01-Fundamentals Command Reference
- 00-Preface
- 01-CLI commands
- 02-RBAC commands
- 03-Login management commands
- 04-FTP and TFTP commands
- 05-File system management commands
- 06-Configuration file management commands
- 07-Software upgrade commands
- 08-ISSU commands
- 09-Emergency shell commands
- 10-Device management commands
- 11-Tcl commands
- 12-License management commands
- 13-Password recovery control command
- 14-Python commands
- Related Documents
-
Title | Size | Download |
---|---|---|
07-Software upgrade commands | 123.8 KB |
Contents
The software upgrade commands can be executed only on the default MDC (Admin). For more information about MDC, see Virtual Technologies Configuration Guide.
boot-loader file
Use boot-loader file to specify startup software image files.
Syntax
In standalone mode:
boot-loader file boot boot-package system system-package [ feature feature-package&<1-30> ] { all | slot slot-number } { backup | main }
boot-loader file ipe-filename { all | slot slot-number } { backup | main }
In IRF mode:
boot-loader file boot boot-package system system-package [ feature feature-package&<1-30> ] { all | chassis chassis-number slot slot-number } { backup | main }
boot-loader file ipe-filename { all | chassis chassis-number slot slot-number } { backup | main }
Views
User view
Predefined user roles
network-admin
Parameters
boot boot-package: Specifies the file path of a .bin boot image file, a case-insensitive string. The file must be stored in the root directory of a storage medium in the system. The maximum length is 1 to 63 characters for the storage-medium:/base-filename.bin segments of the file path. This length limit does not include the IRF member ID or slot number in front of the storage medium segment. For more information about specifying a file path, see "Managing the file system."
system system-package: Specifies the file path of a .bin system image file, a case-insensitive string. The file must be stored in the root directory of a storage medium in the system. The maximum length is 1 to 63 characters for the storage-medium:/base-filename.bin segments of the file path. This length limit does not include the IRF member ID or slot number information in front of the storage medium segment. For more information about specifying a file path, see "Managing the file system."
feature feature-package: Specifies a space-separated list of up to 30 .bin feature image file paths. The file paths are case insensitive. The files must be stored in the root directory of a storage medium in the system. The maximum length is 1 to 63 characters for the storage-medium:/base-filename.bin segments of a file path. This length limit does not include the IRF member ID or slot number information in front of the storage medium segment. For more information about specifying a file path, see "Managing the file system."
ipe-filename: Specifies the file path of an .ipe image package file, a case-insensitive string. The file must be stored in the root directory of a storage medium in the system. The maximum length is 1 to 63 characters for the storage-medium:/base-filename.ipe segments of the file path. This length limit does not include the IRF member ID or slot number information in front of the storage medium segment.
all: Specifies startup images for all cards. If you specify this keyword, the system copies the card-specific images automatically to the root directory of the storage medium on each card. For a successful upgrade, make sure the specified files include the upgrade images for all cards.
slot slot-number: Specifies the slot number of the MPU for which the startup images are specified. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies the MPU for which the startup images are specified in the IRF fabric. The chassis-number argument represents the IRF member ID of the device that holds the card, and the slot-number argument represents the slot number of the card. (In IRF mode.)
backup: Specifies the files as backup startup files. Backup startup images are used only when main images are not available.
main: Specifies the files as main startup files. The device always first attempts to start up with main startup files.
Usage guidelines
This command copies the upgrade images to the specified MPUs and sets the images as startup images. The images are saved in the root directory of storage media. If a specified MPU contains an image with the same file name as the upgrade image, you must choose whether to overwrite the image already on the specified MPU.
Use this command to upgrade the startup software images on all MPUs. To upgrade only standby MPUs, you can also use the boot-loader update command.
Before specifying startup software image files, you must perform the following tasks:
· Save the upgrade files to the root directory of a storage medium on the active MPU (in standalone mode) or the global active MPU (in IRF mode). If the storage medium is partitioned, save the files to the root directory of the first partition.
· If the specified software images require a license, register and activate a license for each image. If a license-based software image lacks a license, the command execution result is as follows:
¡ The boot-loader file boot boot-package system system-package [ feature feature-package&<1-30> ] command cannot be issued.
¡ The boot-loader file ipe-filename command can set all the images except the license-based image that lacks a license.
For more information about licensing, see Fundamentals Configuration Guide.
The boot-loader file command overwrites the entire startup software image list. To add new startup feature images, specify all feature image files, including feature image files in the old startup software image list. The new startup software image list will contain only the feature image files that are specified in the command.
Examples
# In standalone mode, specify flash:/all.ipe as the main startup image file for the MPU in slot 0.
<Sysname> boot-loader file flash:/all.ipe slot 0 main
Verifying image file...........................Done.
H3C S12518 images in IPE:
boot.bin
system.bin
This command will set software images on the slot. Continue? [Y/N]:Y
Do you want to overwrite files without prompt? [Y/N]:n
Specify the main startup software images for H3C S12518.
Add images to slot 0.
flash:/boot.bin already exists on slot 0.
flash:/system.bin already exists on slot 0.
Overwrite it? [Y/N]:y
Decompressing file boot.bin to flash:/boot.bin........................Done.
Decompressing file system.bin to flash:/system.bin...............................Done.
The images that have passed all examinations will be used as the main startup so
ftware images at the next reboot on slot 0.
# In IRF mode, specify flash:/all.ipe as the main startup image file for the MPU in slot 0 on IRF member device 1.
<Sysname> boot-loader file flash:/all.ipe chassis 1 slot 0 main
Verifying image file...........................Done.
H3C S12518 images in IPE:
boot.bin
system.bin
This command will set software images on the slot. Continue? [Y/N]:Y
Do you want to overwrite files without prompt? [Y/N]:n
Specify the main startup software images for H3C S12518.
Add images to chassis 1 slot 0.
flash:/boot.bin already exists on chassis 1 slot 0.
flash:/system.bin already exists on chassis 1 slot 0.
Overwrite it? [Y/N]:y
Decompressing file boot.bin to flash:/boot.bin........................Done.
Decompressing file system.bin to flash:/system.bin...............................Done.
The images that have passed all examinations will be used as the main startup so
ftware images at the next reboot on chassis 1 slot 0.
display boot-loader
boot-loader update
In standalone mode:
Use boot-loader update to synchronize startup images from the active MPU to the standby MPU.
In IRF mode:
Use boot-loader update to synchronize startup images from the global active MPU to a standby MPU.
Syntax
In standalone mode:
boot-loader update { all | slot slot-number }
In IRF mode:
boot-loader update { all | chassis chassis-number slot slot-number }
Views
User view
Predefined user roles
network-admin
Parameters
all: Upgrades the standby MPU. (In standalone mode.)
all: Upgrades all standby MPUs in the IRF fabric. (In IRF mode.)
slot slot-number: Specifies the slot number of the standby MPU. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies a standby MPU of the global active MPU. The chassis-number argument represents the IRF member ID of the device that holds the standby MPU. The slot-number argument represents the slot number of the standby MPU. (In IRF mode.)
Usage guidelines
You can use this command to synchronize startup images after adding new MPUs.
If any of the startup software images require a license, register and activate a license for the image on the new MPU before executing this command. Use the display license feature command to verify the licensing state of software images.
The startup images synchronized to the standby MPU are set as main startup images, regardless of whether the source startup images are main or backup.
In the following description, the term "active MPU" collectively refers to the active MPU in standalone mode and the global active MPU in IRF mode.
If the active MPU has started up with main startup images, its main startup images are synchronized to the standby MPU, regardless of whether any change has been made to this set of startup images.
If the active MPU has started up with backup startup images, its backup startup images are synchronized to the standby MPU, regardless of whether any change has been made to this set of startup images.
Startup image synchronization fails if any software image being synchronized is not available or is corrupted.
If an ISSU upgrade has been performed, use the install commit command to update the main startup images on the active MPU before software synchronization. The command ensures startup image consistency between the active MPU and the standby MPU.
Examples
# In standalone mode, synchronize startup images from the active MPU to the standby MPU in slot 1.
<Sysname> boot-loader update slot 1
This command will update the specified standby MPU. Continue? [Y/N]:y
Updating. Please wait...
Copying main startup software images to slot 1. Please wait...
Done.
Setting copied images as main startup software images for slot 1...
Done.
The images that have passed all examinations will be used as the main startup so
ftware images at the next reboot on slot 1.
Done.
Successfully updated the startup software images of slot 1.
# In IRF mode, synchronize startup images from the global active MPU to the MPU in slot 1 on IRF member device 1.
<Sysname> boot-loader update chassis 1 slot 1
This command will update the specified standby MPU. Continue? [Y/N]:y
Updating. Please wait...
Copying main startup software images to chassis 1 slot 1. Please wait...
Done.
Setting copied images as main startup software images for chassis 1 slot 1...
Done.
The images that have passed all examinations will be used as the main startup so
ftware images at the next reboot on chassis 1 slot 1.
Done.
Successfully updated the startup software images of chassis 1 slot 1.
· display boot-loader
· install commit
bootrom update
Use bootrom update to load the BootWare image in the flash to the Normal area of BootWare.
Syntax
In standalone mode:
bootrom update file file-url slot slot-number-list
In IRF mode:
bootrom update file file-url chassis chassis-number slot slot-number-list
Views
User view
Predefined user roles
network-admin
Parameters
file file-url: Specifies the file that contains the BootWare image in the flash. The file-url argument represents the file name, a string of 1 to 63 characters.
slot slot-number-list: Specifies a space-separated list of up to seven slot number items. Each item specifies a card by its slot number or a range of cards in the form of start-slot-number to end-slot-number. For example, slot 0 to 1 2. (In standalone mode.)
chassis chassis-number: Specifies an IRF member device by its member ID. (In IRF mode.)
slot slot-number-list: Specifies a space-separated list of up to seven slot number items. Each item specifies a card by its slot number or a range of cards in the form of start-slot-number to end-slot-number on the specified IRF member device. For example, slot 0 to 1 2. (In IRF mode.)
Usage guidelines
If a software upgrade requires upgrading the BootWare image, you can use this command to preload the new BootWare image to the BootWare before upgrading Comware images. This command helps shorten the subsequent upgrade time, reducing the risk of upgrade failure caused by unexpected electricity failure.
To complete the upgrade, reboot the device.
To save space, you can delete the BootWare image in the flash after completing the BootWare image upgrade.
Examples
# Use the file a.btw to upgrade the BootWare image.
<Sysname> bootrom update file a.btw slot 0
This command will update the Boot ROM file on the specified board(s), Continue? [Y/N]:y
Now updating the Boot ROM, please wait...
.............Done.
Related commands
boot-loader file
display boot-loader
Use display boot-loader to display current software images and startup software images.
Syntax
In standalone mode:
display boot-loader [ slot slot-number ]
In IRF mode:
display boot-loader [ chassis chassis-number slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies the slot number of an MPU. If no MPU is specified, this command displays the software images on each MPU. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies an MPU in an IRF member device. The chassis-number argument represents the IRF member ID of the device, and the slot-number argument represents the slot number of the MPU on the device. If no MPU is specified, this command displays the software images on each MPU in the IRF fabric. (In IRF mode.)
Examples
# In standalone mode, display current software images and startup software images.
<Sysname> display boot-loader
Software images on slot 0:
Current software images:
flash:/boot-a1701.bin
flash:/system-a1701.bin
Main startup software images:
flash:/boot-a1701.bin
flash:/system-a1701.bin
flash:/ssh-a1701.bin
Backup startup software images:
flash:/boot-a1701.bin
flash:/system-a1701.bin
# In IRF mode, displays current software images and startup software images.
<Sysname> display boot-loader
Software images on chassis 0 slot 1:
Current software images:
flash:/boot-a1701.bin
flash:/system-a1701.bin
Main startup software images:
flash:/boot-a1701.bin
flash:/system-a1701.bin
flash:/ssh-a1701.bin
Backup startup software images:
flash:/boot-a1701.bin
flash:/system-a1701.bin
Table 1 Command output
Field |
Description |
Software images on slot slot-number |
In standalone mode, this field displays the Comware images on the MPU in the specified slot. |
Software images on chassis chassis-id slot slot-number |
In IRF mode, this field displays the Comware images on the specified MPU. The chassis ID represents the IRF member ID, and the slot-number represents the MPU's slot number. |
Current software images |
Comware images that have been loaded. |
Main startup software images |
Main Comware images for the next startup. |
Backup startup software images |
Backup Comware images for the next startup. |
Related commands
boot-loader file
fan update
Use fan update to upgrade the fan monitor software of a fan tray.
Syntax
In standalone mode:
fan update [ file filename ] tray { top | bottom }
In IRF mode:
fan update [ file filename ] chassis chassis-number tray { top | bottom }
Views
User view
Predefined user roles
network-admin
Parameters
file filename: Specifies the fan monitor upgrade file. The filename argument represents the upgrade file name, a string of 1 to 63 characters. If no upgrade file is specified, this command uses the fan monitor software file contained in the current software image file. In IRF mode, you must save the upgrade file on the active MPU that is in the same chassis as the fan tray you are upgrading.
tray { top | bottom }: Specifies the fan tray to be upgraded. The top keyword specifies the upper fan tray and the bottom keyword specifies the lower fan tray. The S12504 switch supports only the top keyword because it only has one upper fan tray.
chassis chassis-number: Specifies the IRF member device that contains the fan tray. The chassis-number argument represents the ID of the IRF member device. (In IRF mode.)
Usage guidelines
On the S12508 or S12518 switch, this command is available only for fan trays that use software version 103 and CPLD 002 (or above). After the upgrade is complete for one fan tray, you must remove the fan tray, and then reinstall it to run the upgraded software before you can continue to upgrade the other fan tray.
On the S12504 switch, this command is available only for fan trays that use software version 202 (or above).
To verify fan tray information, use the display fan verbose command.
To avoid damage to the fan monitor module, make sure no one performs any of the following operations during the upgrade:
· Remove the fan tray before the system displays the upgrade completed message.
· Perform an active/standby switchover.
· Execute the power-supply off command.
· Power off the device.
· Reboot or swap the active MPU.
While a fan tray is being upgraded, you cannot configure the fan tray or the power modules.
Examples
# Use the fan monitor software in the current software image file to upgrade the fan monitor software of the top fan tray.
<Sysname> fan update tray top
The fan and power manage does not work during update period. Continue? [Y/N]:y
Begin to update fan, progress
OK!
Update the fan tray successfully, please reset by hand.
display fan verbose
logic update
Use logic update to upgrade a CPLD on an interface card or MPU through the MBUS daughter card.
Syntax
In standalone mode:
logic update [ file filename ] slot slot-number logicid logicid
In IRF mode:
logic update [ file filename ] chassis chassis-number slot slot-number logicid logicid
Views
User view
Predefined user roles
network-admin
Parameters
file filename: Specifies a CPLD upgrade file. The filename argument represents the file name, a string of 1 to 63 characters. If no file is specified, this command uses the CPLD file contained in the current software image file.
slot slot-number: Specifies the slot number of the card to be upgraded. (In standalone mode.)
logicid logicid: Specifies one of the following logic types:
· 0—Specifies the card (interface card or MPU) CPLD.
· 1—Specifies the OAM module CPLD on an MPU, or CPU CPLD on an interface card.
chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument represents the ID of the IRF member device, and the slot-number argument represents the slot number of the card. To verify member ID and slot number information, use the display device command. (In IRF mode.)
Usage guidelines
To upgrade the CPU CPLD on an interface card in an IRF fabric, you must save the upgrade file on the active MPU that is in the same chassis as the interface card.
Before upgrading the CPLD for an interface card, set the interface card in offline state by executing the board-offline command. For more information about the configuration, see Fundamentals Configuration Guide.
To ensure a successful upgrade, make sure no one performs any of the following operations during the upgrade:
· Perform an active and standby switchover.
· Execute the power-supply off command.
· Power off or reboot the device.
· Reboot or swap the active MPU or the card that is being upgraded.
If you are upgrading the OAM module CPLD on an MPU, you must reboot the MPU to run the new CPLD. If you are upgrading a card CPLD or CPU CPLD, the card reboots automatically.
If you install an interface card during a CPLD upgrade, the system can supply power to the card only after the upgrade is complete.
Examples
# Upgrade the OAM module CPLD on the MPU in slot 0.
<Sysname> logic update slot 0 logicid 1
This command will last several minutes, please be patient, and it will reboot th
e board, continue? [Y/N]:y
Begin to update cpld, progress
OK!
CPLD is updated. Please reboot the specified slot to make it effective.
mbus update
Use mbus update to upgrade the MBUS daughter card software on a card.
Syntax
In standalone mode:
mbus update [ file filename ] slot slot-number
In IRF mode:
mbus update [ file filename ] chassis chassis-number slot slot-number
Views
User view
Predefined user roles
network-admin
Parameters
file filename: Specifies the MBUS daughter card software upgrade file. The filename argument represents the upgrade file name, a string of 1 to 63 characters. If no file is specified, this command uses the MBUS daughter card software file contained in the current software image file. In an IRF fabric, you must save the upgrade file on the active MPU in the same chassis as the MBUS daughter card.
slot slot-number: Specifies a card by its slot number. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument represents the ID of the IRF member device, and the slot-number argument represents the slot number of the card. To verify member ID and slot number information, use the display device command. (In IRF mode.)
Usage guidelines
To ensure a successful upgrade, make sure no one performs any of the following operations during the upgrade:
· Perform an active and standby switchover.
· Execute the power-supply off command.
· Power off or reboot the device.
· Reboot or swap the active MPU or the card that hosts the MBUS daughter card.
Examples
# Upgrade the MBUS daughter card software on the card in slot 2.
<Sysname> mbus update file cfa0:/mbus_v101.bin slot 2
This command will reboot the specified mbus card, continue? [Y/N]:y
Begin to update mbus, progress
OK!
Update High
pmu update
Use pmu update to upgrade the software of a power monitoring module.
Syntax
In standalone mode:
pmu update [ file filename ] pmu-id
In IRF mode:
pmu update [ file filename ] chassis chassis-number pmu-id
Views
User view
Predefined user roles
network-admin
Parameters
file filename: Specifies an upgrade file for the power monitoring module. The filename argument represents the upgrade file name, a string of 1 to 63 characters. If no upgrade file is specified, this command uses the power monitoring module software file contained in the current software image file. In IRF mode, you must save the specified upgrade file on the active MPU that is in the same chassis as the power monitoring module.
chassis chassis-number: Specifies the IRF member device that contains the power monitoring module. The chassis-number argument represents the ID of the IRF member device. To verify IRF member ID information, use the display device command. (In IRF mode.)
pum-id: Specifies the power monitoring module ID. On the S12504 or S12508 switch, the value is 1. On the S12518 switch, the value is 1 and 2.
Usage guidelines
To ensure a successful upgrade, make sure no one performs any of the following operations during the upgrade:
· Perform an active and standby switchover.
· Execute the power-supply off command.
· Power off the device.
· Reboot or swap the active MPU.
Examples
# In standalone mode, upgrade the software of the power monitoring module on the device.
<Sysname> pmu update file cfa0:/test.bin 1
The fan and power manage does not work during update period. Continue? [Y/N]:y
Begin to update pmu, progress
OK!
# In IRF mode, upgrade the software of power monitoring module 1 on member device 1.
<Sysname> pmu update file cfa0:/test.bin chassis 1 1
The fan and power manage does not work during update period. Continue? [Y/N]:y
Begin to update pmu, progress
OK!
power-logic update
Use power-logic update to upgrade the power software on a card.
Syntax
In standalone mode:
power-logic update [ file filename ] slot slot-number
In IRF mode:
power-logic update [ file filename ] chassis chassis-number slot slot-number
Views
User view
Predefined user roles
network-admin
Parameters
file filename: Specifies the upgrade file. The filename argument represents the upgrade file name, a string of 1 to 63 characters. If the argument is not specified, this command uses the upgrade file contained in the current software image file. In an IRF fabric, you must save the upgrade file on the active MPU that is in the same chassis as the card you are working with.
slot slot-number: Specifies the slot number of the card to be upgraded. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies a card to be upgraded. The chassis-number argument represents the ID of the IRF member device that contains the card, and the slot-number argument specifies the slot number of the card. To verify IRF member ID and slot information, use the display device command. (In IRF mode.)
Usage guidelines
This command is not available for MPUs.
Before upgrading the card, use the board-offline command to set the card in offline state. To display the card state, use the display device command.
To ensure a successful upgrade, make sure no one performs any of the following operations during the upgrade:
· Perform an active and standby switchover.
· Execute the power-supply off command.
· Power off the device.
· Reboot or swap the active MPU or the card that is being upgraded.
If the system instructs you to choose a card model during the upgrade, use the card model on the card panel as a reference to make the correct choice. The upgrade fails if you fail to enter a choice within 30 seconds, or fail to choose the correct model within five attempts.
When the upgrade is complete, the card reboots automatically to run the new software.
If you install a card during a power software upgrade, the system can supply power to the card only after the upgrade is complete.
Examples
# Upgrade the power software on the card in slot 2.
<Sysname> power-logic update slot 2
This command will reboot the specified slot, continue? [Y/N]:y
OK!
Update power logic successfully.
version auto-update enable
Use version auto-update enable to enable software synchronization from the active MPU to the standby MPU at startup.
Use undo version auto-update enable to disable the function.
Syntax
version auto-update enable
undo version auto-update enable
Default
If software inconsistency is detected at startup, the standby MPU loads the current software images of the active MPU.
Views
System view
Predefined user roles
network-admin
Usage guidelines
This command is available in standalone mode.
To make sure the standby MPU always runs the same software images as the active MPU, configure both the version auto-update enable command and the undo version check ignore command.
The startup software version check function examines the standby MPU's startup software images for version inconsistency with the active MPU's current software images at startup. If their software versions are different, the standby MPU copies the current software images of the active MPU, specifies them as main startup software images, and reboots with these images.
To ensure a successful synchronization in a multiuser environment, make sure no one reboots or swaps MPUs during the software synchronization process. You can configure the information center to output the synchronization status to configuration terminals (see Network Management and Monitoring Configuration Guide).
Examples
# Enable software auto-update for the standby MPU.
<Sysname> system-view
[Sysname] version auto-update enable
Related commands
version check ignore
version check ignore
Use version check ignore to disable startup software version check for the standby MPU at startup.
Use undo version check ignore to enable this function.
Syntax
version check ignore
undo version check ignore
Default
The startup software images on the standby MPU are checked for version inconsistency with the current software images on the active MPU.
Views
System view
Predefined user roles
network-admin
Usage guidelines
This command is available in standalone mode.
When the standby MPU starts up, this command disables the system to examine the standby MPU's startup software images for version inconsistency with the active MPU's current software images. The standby MPU can start up with a different software version than the active MPU.
Even though you can use this command for upgrading software, H3C recommends the ISSU method to software upgrade. The startup software version check function might fail to work because the software versions of the MPUs are incompatible.
To avoid anomalies, do not disable startup software version check for the standby MPU unless for software upgrade.
To make sure the standby MPU always runs the same software images as the active MPU, configure both the version auto-update enable command and the undo version check ignore command.
Examples
# Enable startup software version check for the standby MPU.
<Sysname> system-view
[Sysname] undo version check ignore
Related commands
version auto-update enable