Switch Firmware Upgrade: Huawei

By following these steps and best practices, you can ensure a smooth and successful firmware upgrade of your Huawei switch.

Manually upgrading 50 edge switches is tedious. Modern Huawei switches support NETCONF over SSH. Sample Python script using ncclient:

from ncclient import manager
with manager.connect(host="10.0.0.1", port=830, username="admin", password="Huawei@123", hostkey_verify=False) as m:
    # Copy file via SCP
    m.copy_file(source="http://server/firmware.cc", target="flash:/new_firmware.cc")
    # Set startup
    m.edit_config(target="running", config="""<config><sysman><startup><software>flash:/new_firmware.cc</software></startup></sysman></config>""")
    # Reboot
    m.reboot()

This allows you to use Ansible’s huawei_switch collection for zero-touch upgrades.


Here's an example output of a Huawei switch firmware upgrade:

< Huawei > display version
Huawei Versatile Routing Platform Software
Version 5.170 (V200R003C00SPC500)
< Huawei > upgrade package C-FTTH-V5-170.ccp
 Warning: This operation may take a few minutes to complete. Please wait...
 upgrade package C-FTTH-V5-170.ccp ........... done!
< Huawei > reboot
 Warning: The system will be rebooted, and all current connections will be terminated.
< Huawei > display version
Huawei Versatile Routing Platform Software
Version 5.171 (V200R003C00SPC600)

Before you start the upgrade process, make sure to: Huawei Switch Firmware Upgrade

Always keep the previous firmware file and a full configuration backup on the flash.

If issues arise:

Note: Always test rollback in lab first.

This was the moment of no return. In a stack configuration, you can perform a smooth upgrade, but the S7700 required a specific startup sequence. He had to modify the boot loader. By following these steps and best practices, you

<S7700> startup system-software S7700_V200R019.cc

The terminal echoed back: Success. But the switch was still running the old logic. To engage the new firmware, the system had to reboot. That meant five minutes of darkness. Five minutes where the heart of the data center stopped beating.

Chen opened the chat window with the night manager. Chen: "Initiating reboot in 60 seconds. Blackout expected: 5-8 mins. Standby."

He typed the final command. <S7700> reboot This allows you to use Ansible’s huawei_switch collection

The system prompted: Warning: The system will reboot. Continue? [Y/N]

His finger hovered over the 'Y' key. In that second, every worst-case scenario flashed through his mind: The new firmware could be incompatible with the line cards. The power supply could fail under the reboot surge. The configuration could corrupt.

He pressed 'Y'.