Contents

Introduction

Prerequisites

Requirements

Components Used

Background Information

Applicable Hardware

Caveats & Limitations

MD5 & SHA512 Checksum of NX-OS Binary Image File Changes After Executing NX-OS Compact Image Procedure

Compact Image Procedure for NX-OS Binary Image File via SCP Fails Over In-Band Interface

Compact Image Procedure for NX-OS Binary Image File via SCP Fails at 29%

Nexus Switch Stuck in Boot Loop After Upgrade to NX-OS Software Release in 9.3(x) Major Release with Compact Image

NX-OS Compact Image Platform Groups

Compact NX-OS Software Images on Cisco's Software Download Website

NX-OS Compact Image Procedure

Compact Image Procedure for NX-OS Binary Image File on Bootflash

Compact Image Procedure for NX-OS Binary Image File on USB

Compact Image Procedure for NX-OS Binary Image File via SCP

Use a Linux Host as an SCP Server

Use a Nexus Device as an SCP Server

Additional Information

Related Information

Introduction

This document describes file size reduction of an NX-OS binary image file on Cisco Nexus 3000/3100/3500 switches with the Compact Image procedure.

Prerequisites

Requirements

Cisco recommends that you understand the basics of copying files in Cisco NX-OS using file transfer protocols (such as TFTP [Trivial File Transfer Protocol], FTP [File Transfer Protocol], SCP [Secure Copy Protocol], SFTP [Secure File Transfer Protocol], and so on). For information about this feature, refer to one of these applicable documents:

- Cisco Nexus 3000 Series NX-OS Fundamentals Configuration Guide, Release 9.3(x)

- Cisco Nexus 3000 Series NX-OS Fundamentals Configuration Guide, Release 9.2(x)

- Cisco Nexus 3000 Series NX-OS Fundamentals Configuration Guide, Release 7.x

- Cisco Nexus 3548 Switch NX-OS Fundamentals Configuration Guide, Release 9.3(x)

- Cisco Nexus 3548 Switch NX-OS Fundamentals Configuration Guide, Release 9.2(x)

- Cisco Nexus 3548 Switch NX-OS Fundamentals Configuration Guide, Release 7.x

Components Used

The information in this document is based on Cisco Nexus 3000, 3100, and 3500 Series switches listed in the Applicable Hardware section of this document.

The device output in this document was taken from a Nexus 3064PQ-10GE device running NX-OS software release 7.0(3)I7(8).

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.

Background Information

This document describes the steps used to reduce the file size of an NX-OS binary image file on Cisco Nexus 3000, 3100, and 3500 Series switches through the Compact Image procedure.

It also describes the tactics used to perform this procedure in a variety of different environments with access to different resources.

Early models of Cisco Nexus 3000, 3100, and 3500 Series switches have 1.4 to 1.6 gigabytes of storage space allocated to the bootflash.

Over time, the file size of NX-OS binary image files has steadily increased to be over 1 gigabyte.

As a result, it is difficult for Nexus 3000, 3100, and 3500 Series switches to simultaneously store more than one full NX-OS binary image at a time.

Therefore, administrators cannot complete the standard NX-OS software upgrade procedure on Nexus 3000, 3100, and 3500 Series switches that are used for other Nexus platforms, such as Nexus 5000, 6000, 7000, and 9000 Series switches.

From NX-OS software release 7.0(3)I3(1) onward, the file size of NX-OS binary image files can be reduced through a Compact Image procedure.

This is a non-disruptive procedure that does not affect the switch's control plane or ability to forward data plane traffic.

This procedure can be performed on NX-OS binary image files in these scenarios:

1. When NX-OS binary image files are located on the bootflash of the Nexus device

2. When NX-OS binary image files are located on a USB flash drive attached to the Nexus device

3. When NX-OS binary image files are copied to the bootflash of the Nexus device using Secure Copy Protocol (SCP)

This document provides the steps used to reduce the file size of an NX-OS binary image file through the Compact Image procedure for each of the previous scenarios.

Applicable Hardware

The procedure covered in this document is applicable to this hardware only:

- Nexus 3000 Devices

- N3K-C3048TP-1GE

- N3K-C3064PQ-10GE

- N3K-C3064PQ-10GX

- N3K-C3064TQ-10GT

- Nexus 3100 Devices

- N3K-C3132Q-40GE

- N3K-C3132Q-40GX

- N3K-C3164Q-40GE

- N3K-C3172PQ-10GE

- N3K-C3172TQ-10GT

- N3K-C3172TQ-32T

- Nexus 3500 Devices

- N3K-C3524P-10G

- N3K-C3548P-10G

- N3K-C3524P-10GX

- N3K-C3548P-10GX

Note: This procedure is not applicable to Nexus 3172 -XL hardware (namely, N3K-C3172PQ-XL and N3K-C3172TQ-XL) or 3500 -XL hardware (namely, N3K-C3524P-XL and N3K-C3548P-XL). These devices have enough bootflash space that they do not need NX-OS binary image files to be compacted through the Compact Image procedure.

Caveats & Limitations

The NX-OS Compact Image procedure has some caveats and limitations you must be aware of.

MD5 & SHA512 Checksum of NX-OS Binary Image File Changes After Executing NX-OS Compact Image Procedure

As part of the NX-OS Compact Image procedure, the file size of an NX-OS binary image file is substantially reduced.

As a result of changing the file size, the MD5 and SHA512 checksum of the compacted NX-OS binary image file does not match the MD5 and SHA512 checksum published on Cisco's Software Download website.

This is expected behavior and is not indicative of an issue with the NX-OS Compact Image procedure.

Compact Image Procedure for NX-OS Binary Image File via SCP Fails Over In-Band Interface

You can encounter an error when performing the NX-OS Compact Image procedure via SCP on an NX-OS binary image file over an in-band interface (such as through an SVI or a routed front-panel port) while running one of these NX-OS software releases:

- 7.0(3)I5(2)

- 7.0(3)I6(1)

- 7.0(3)I6(2)

- 7.0(3)I7(1)

An example of this error is shown here:

switch# copy scp://username@192.0.2.100/nxos.7.0.3.I7.8.bin bootflash: compact

Enter vrf (If no input, current vrf 'default' is considered):

ssh_exchange_identification: Connection closed by remote host

Scp Compact of /bootflash/nxos.7.0.3.I7.8.bin failed

Error doing scp

Copy failed. Removing file nxos.7.0.3.I7.8.bin

This is due to software defect, Cisco bug ID CSCvg51567, where the NX-OS Compact Image procedure via SCP is performed over any VRF other than the management VRF that the mgmt0 interface is assigned.

On the previous NX-OS software releases, the NX-OS Compact Image procedure via SCP must be performed over the mgmt0 interface within the management VRF.

Compact Image Procedure for NX-OS Binary Image File via SCP Fails at 29%

You can encounter an error when performing the NX-OS Compact Image procedure via SCP on an NX-OS binary image file in the NX-OS 9.3(x) major release (such as 9.3(1), 9.3(2), 9.3(3), and so on) when running an NX-OS software release prior to 7.0(3)I7(7) (such as 7.0(3)I7(3), 7.0(3)I7(4), 7.0(3)I7(5a), and so on) or 9.2(4) (such as 9.2(1), 9.2(2), and 9.2(3). An example of this error is shown here:

switch# copy scp://username@192.0.2.100/nxos.9.3.3.bin bootflash: compact vrf management

Outbound-ReKey for 192.0.2.100:22

Inbound-ReKey for 192.0.2.100:22

username@192.0.2.100's password:

nxos.9.3.3.bin 29% 477MB 4.9MB/s 03:49 ETA

lost connection

Scp Compact of /bootflash/nxos.9.3.3.bin failed

Error doing scp

This is a result of a known limitation documented in Cisco bug ID CSCvt11426. Execution of the NX-OS Compact Image procedure on an NX-OS binary image file in the NX-OS 9.3(x) major release (such as 9.3(1), 9.3(2), 9.3(3), and so on) is not supported until NX-OS software release 7.0(3)I7(7) or 9.2(4).

To work around this issue, upgrade to NX-OS software release 7.0(3)I7(7) or 9.2(4) (which involves execution of the NX-OS Compact Image procedure on those respective NX-OS binary image files) prior to upgrade to an NX-OS software release in the 9.3(x) major release (such as 9.3(1), 9.3(2), 9.3(3), and so on).

Nexus Switch Stuck in Boot Loop After Upgrade to NX-OS Software Release in 9.3(x) Major Release with Compact Image

A Nexus switch upgraded to an NX-OS software release in the 9.3(x) major release (such as 9.3(1), 9.3(2), 9.3(3), and so on) after execution of the NX-OS Compact Image procedure can continuously boot loop after the switch is reloaded as part of the standard disruptive upgrade. This error message appear on the console of the switch:

Image valid

MD5Sum mismatch

File does not exist, boot failed.

This is a result of a known limitation documented in Cisco bug ID CSCvs23686. Execution of the NX-OS Compact Image procedure on an NX-OS binary image file in the NX-OS 9.3(x) major release (such as 9.3(1), 9.3(2), 9.3(3), and so on) is not supported until NX-OS software release 7.0(3)I7(7) or 9.2(4).

To work around this issue, you must upgrade to NX-OS software release 7.0(3)I7(7) or 9.2(4) (which can involve execution of the NX-OS Compact Image procedure on those respective NX-OS binary image files) prior to attempting to upgrade to an NX-OS software release in the 9.3(x) major release (such as 9.3(1), 9.3(2), 9.3(3), and so on).

NX-OS Compact Image Platform Groups

The NX-OS Compact Image procedure described by this document is applicable to three separate platform groups:

- Nexus 3000 devices (N3K-C3048, N3K-C3064, and so on)

- Nexus 3100 devices (N3K-C3132, N3K-C3172, and so on)

- Nexus 3500 devices (N3K-C3524, N3K-C3548, and so on)

A compacted NX-OS binary image file can be re-used among other devices within the same platform group. However, a compact NX-OS binary image file cannot be used on devices that belong to a different platform group.

For example, consider a scenario where you have four Nexus 3000 devices of these models:

- N3K-C3048TP-1GE

- N3K-C3064PQ-10GE

- N3K-C3172PQ-40GX

- N3K-C3548P-10G

An NX-OS binary image file compacted on the N3K-C3048TP-1GE can be transferred directly to the bootflash of the N3K-C3064PQ-10GE via a file transfer protocol of your choice (if there is enough room on the N3K-C3064PQ-10GE).

Furthermore, the N3K-C3064PQ-10GE can be upgraded with the use of this compact NX-OS binary image file through a supported method.

However, this same compact NX-OS binary image file cannot be used to upgrade the N3K-C3172PQ-40GX and N3K-C3548P-10G devices.

The NX-OS Compact Image procedure must be executed on both N3K-C3172PQ-40GX and N3K-C3548P-10G devices separately.

This compatibility between Nexus devices within the same platform group can be used to optimize the NX-OS software upgrade of a large number of devices.

For example, if you have 100 N3K-C3048TP-1GE devices, you can use the NX-OS Compact Image procedure on a single device, then transfer the compact NX-OS binary image file to the resulting 99 devices.

There is no need to perform the NX-OS Compact Image procedure on all 100 devices.

Compact NX-OS Software Images on Cisco's Software Download Website

As of January 18th, 2021, compact NX-OS software images are available for download on Cisco's Software Download website for a few NX-OS software releases. These compact images have a published MD5/SHA512 checksum that can be used to verify the integrity of the NX-OS binary image file. The compact NX-OS software images can be downloaded from Cisco's Software Download website for these NX-OS software releases:

- 9.3(4) and later

- 9.2(4)

- 7.0(3)I7(8) and later

Note: If possible, download compact NX-OS software images from Cisco's Software Download website instead of utilizing the Compact Image procedure outlined by this document. The Compact Image procedure outlined by this document is only utilized in scenarios where a compact NX-OS software images is not available for download on Cisco's Software Download website.

Note: The MD5/SHA512 checksum published on Cisco's Software Download website for a compact NX-OS software image could not match the MD5/SHA512 checksum of a compact image created through the NX-OS Compact Image procedure outlined by this document.

NX-OS Compact Image Procedure

Compact Image Procedure for NX-OS Binary Image File on Bootflash

After you upgrade to NX-OS software release 7.0(3)I3(1) or higher, execute the Compact Image procedure on an NX-OS binary image file stored on the bootflash of the Nexus device with the use of the install all nxos bootflash:{nxos-binary-image-file.bin} compact command.

This is typically executed on the NX-OS binary image file which corresponds with the NX-OS software release which currently runs on the Nexus device itself. This procedure is typically performed immediately after you upgrade from an NX-OS software release that does not support the Compact Image procedure (such as NX-OS 6.0(2)U6(3a)) to an image that does support the Compact Image procedure (such as NX-OS 7.0(3)I7(8)).

The example here demonstrates the usage of this command on a Nexus 3064PQ-10GE device recently upgraded from NX-OS 6.0(2)U6(3a) to NX-OS 7.0(3)I7(8). Even though you actively run NX-OS software release 7.0(3)I7(8), you can use the Compact Image procedure on the NX-OS 7.0(3)I7(8) binary image file stored on the bootflash of device. The Compact Image procedure is not supported until NX-OS 7.0(3)I3(1), so you are unable to compact the NX-OS 7.0(3)I7(8) binary image file while NX-OS 6.0(2)U6(3a) runs.

N3K-C3064PQ# show module

<snip>

Mod Ports             Module-Type                       Model          Status

--- ----- ------------------------------------- --------------------- ---------

1    64   48x10GE + 16x10G/4x40G Supervisor     N3K-C3064PQ-10GE      active *

Mod  Sw                Hw     Slot

---  ----------------  ------ ----

1    7.0(3)I7(8)       1.0    NA

N3K-C3064PQ# show system reset-reason

<snip>

----- reset reason for module 1 (from Supervisor in slot 1) ---

1) At 571567 usecs after Mon Jun 15 19:40:15 2020

Reason: Disruptive upgrade

Service:

Version: 6.0(2)U6(3a)

The NX-OS kickstart and system image files for 6.0(2)U6(3a) are still present on the bootflash, as well as the full NX-OS 7.0(3)I7(8) binary image file.

N3K-C3064PQ# dir bootflash:

30261    Apr 03 16:28:46 2017  .n3k_pre_single_img_upd_config

4096    Jun 15 15:05:04 2020  .rpmstore/

4096    Feb 08 16:38:11 2017  .swtam/

362528    Jun 15 19:59:44 2020  20200615_195315_poap_29012_init.log

945    Jun 15 19:11:16 2020  bios_daemon.dbg

0    Jun 15 19:43:24 2020  bootflash_sync_list

4096    Jun 15 19:43:36 2020  logflash/

37853184    Jun 15 19:01:36 2020  n3000-uk9-kickstart.6.0.2.U6.3a.bin

206762702    Jun 15 19:02:43 2020  n3000-uk9.6.0.2.U6.3a.bin

982681088    Jun 15 19:27:34 2020  nxos.7.0.3.I7.8.bin

324    Jun 15 19:51:08 2020  patch_control.log

58    Jun 15 19:51:08 2020  patch_debug.log

0    Jun 15 19:48:16 2020  platform-sdk.cmd

4096    Jun 15 19:53:15 2020  scripts/

1024    Jun 15 19:51:23 2020  sprom_2_0_1

1024    Jun 15 19:51:23 2020  sprom_3_0_0

1024    Jun 15 19:14:08 2020  sprom_cstruct_2_0_0

1024    Jun 15 19:14:40 2020  sprom_cstruct_3_0_0

4096    Jun 15 19:14:22 2020  vdc_2/

4096    Jun 15 19:14:22 2020  vdc_3/

4096    Jun 15 19:14:22 2020  vdc_4/

4096    Mar 30 22:31:55 2017  virt_strg_pool_bf_vdc_1/

4096    Mar 30 22:31:54 2017  virtual-instance/

3568    Jun 15 19:45:19 2020  vlan.dat

Usage for bootflash://sup-local

1324871680 bytes used

323751936 bytes free

1648623616 bytes total

After the NX-OS kickstart and system image files for 6.0(2)U6(3a) are deleted, about 568 megabytes of free space are left on the bootflash of the device.

N3K-C3064PQ# delete bootflash:n3000-uk9-kickstart.6.0.2.U6.3a.bin no-prompt

N3K-C3064PQ# delete bootflash:n3000-uk9.6.0.2.U6.3a.bin no-prompt

N3K-C3064PQ# dir bootflash:

30261    Apr 03 16:28:46 2017  .n3k_pre_single_img_upd_config

4096    Jun 15 15:05:04 2020  .rpmstore/

4096    Feb 08 16:38:11 2017  .swtam/

362528    Jun 15 19:59:44 2020  20200615_195315_poap_29012_init.log

945    Jun 15 19:11:16 2020  bios_daemon.dbg

0    Jun 15 19:43:24 2020  bootflash_sync_list

4096    Jun 15 19:43:36 2020  logflash/

982681088    Jun 15 19:27:34 2020  nxos.7.0.3.I7.8.bin

324    Jun 15 19:51:08 2020  patch_control.log

58    Jun 15 19:51:08 2020  patch_debug.log

0    Jun 15 19:48:16 2020  platform-sdk.cmd

4096    Jun 15 19:53:15 2020  scripts/

1024    Jun 15 19:51:23 2020  sprom_2_0_1

1024    Jun 15 19:51:23 2020  sprom_3_0_0

1024    Jun 15 19:14:08 2020  sprom_cstruct_2_0_0

1024    Jun 15 19:14:40 2020  sprom_cstruct_3_0_0

4096    Jun 15 19:14:22 2020  vdc_2/

4096    Jun 15 19:14:22 2020  vdc_3/

4096    Jun 15 19:14:22 2020  vdc_4/

4096    Mar 30 22:31:55 2017  virt_strg_pool_bf_vdc_1/

4096    Mar 30 22:31:54 2017  virtual-instance/

3568    Jun 15 19:45:19 2020  vlan.dat

Usage for bootflash://sup-local

1079996416 bytes used

568627200 bytes free

1648623616 bytes total

With only 568 megabytes of free space, there is not enough free space to store another NX-OS binary image file and complete the upgrade process. The Compact Image procedure can be executed with the use of the aforementioned install all nxos bootflash:nxos.7.0.3.I7.8.bin compact command in order to reduce the file size of the NX-OS 7.0(3)I7(8) binary image file.

N3K-C3064PQ# install all nxos bootflash:nxos.7.0.3.I7.8.bin compact

Installer will perform compatibility check first. Please wait.

Compacting currently loaded image bootflash:/nxos.7.0.3.I7.8.bin

.......................................

Compact bootflash:/nxos.7.0.3.I7.8.bin done

After the Compact Image procedure is complete, the NX-OS 7.0(3)I7(8) image file size is considerably smaller. As a result, the amount of free space on the bootflash of the device has changed from 568 megabytes to 1.079 gigabytes.

N3K-C3064PQ# dir bootflash:

30261    Apr 03 16:28:46 2017  .n3k_pre_single_img_upd_config

4096    Jun 15 23:21:43 2020  .rpmstore/

4096    Feb 08 16:38:11 2017  .swtam/

362528    Jun 15 19:59:44 2020  20200615_195315_poap_29012_init.log

1890    Jun 15 22:30:33 2020  bios_daemon.dbg

0    Jun 15 19:43:24 2020  bootflash_sync_list

4096    Jun 15 19:43:36 2020  logflash/

4096    Jun 15 23:12:44 2020  lost+found/

471871960    Jun 15 23:32:10 2020  nxos.7.0.3.I7.8.bin

486    Jun 15 23:21:24 2020  patch_control.log

87    Jun 15 23:21:24 2020  patch_debug.log

0    Jun 15 19:48:16 2020  platform-sdk.cmd

4096    Jun 15 19:53:15 2020  scripts/

1024    Jun 15 22:32:48 2020  sprom_2_0_1

1024    Jun 15 22:32:48 2020  sprom_3_0_0

1024    Jun 15 19:14:08 2020  sprom_cstruct_2_0_0

1024    Jun 15 19:14:40 2020  sprom_cstruct_3_0_0

4096    Jun 15 19:14:22 2020  vdc_2/

4096    Jun 15 19:14:22 2020  vdc_3/

4096    Jun 15 19:14:22 2020  vdc_4/

4096    Mar 30 22:31:55 2017  virt_strg_pool_bf_vdc_1/

4096    Mar 30 22:31:54 2017  virtual-instance/

3568    Jun 15 19:45:19 2020  vlan.dat

Usage for bootflash://sup-local

569184256 bytes used

1079439360 bytes free

1648623616 bytes total

Compact Image Procedure for NX-OS Binary Image File on USB

After you upgrade to NX-OS software release 7.0(3)I3(1) or higher, you can execute the Compact Image procedure on an NX-OS binary image file stored on a USB flash drive inserted into the Nexus device.

This procedure can be executed with the install all nxos {usb-slot}:{nxos-binary-image-file.bin} compact command. This procedure is typically performed when you meet both these two conditions:

1. There is not enough free space on the bootflash to copy the full target NX-OS binary image file to the bootflash.

2. You are unable to perform the Compact Image procedure via SCP for some reason (for example, you do not have an SCP server to use, the switch is in an isolated environment, and so on).

This example demonstrates the usage of this command on a Nexus 3064PQ-10GE device running NX-OS 7.0(3)I7(8) that needs to be upgraded to NX-OS 9.3(4).

N3K-C3064PQ# show module

<snip>

Mod Ports             Module-Type                       Model          Status

--- ----- ------------------------------------- --------------------- ---------

1    64   48x10GE + 16x10G/4x40G Supervisor     N3K-C3064PQ-10GE      active *

Mod  Sw                Hw     Slot

---  ----------------  ------ ----

1    7.0(3)I7(8)       1.0    NA

The existing NX-OS 7.0(3)I7(8) binary image file has already been compacted per the instructions in the Compact Image Procedure for NX-OS Binary Image File on Bootflash section of this document. As a result, there are about 1.07 gigabytes of free space on the bootflash of the Nexus device.

N3K-C3064PQ# dir bootflash:

30261    Apr 03 16:28:46 2017  .n3k_pre_single_img_upd_config

4096    Jun 15 23:21:43 2020  .rpmstore/

4096    Feb 08 16:38:11 2017  .swtam/

362528    Jun 15 19:59:44 2020  20200615_195315_poap_29012_init.log

1890    Jun 15 22:30:33 2020  bios_daemon.dbg

0    Jun 15 19:43:24 2020  bootflash_sync_list

4096    Jun 15 19:43:36 2020  logflash/

4096    Jun 15 23:12:44 2020  lost+found/

471871960    Jun 15 23:32:10 2020  nxos.7.0.3.I7.8.bin

486    Jun 15 23:21:24 2020  patch_control.log

87    Jun 15 23:21:24 2020  patch_debug.log

0    Jun 15 19:48:16 2020  platform-sdk.cmd

4096    Jun 15 19:53:15 2020  scripts/

1024    Jun 15 22:32:48 2020  sprom_2_0_1

1024    Jun 15 22:32:48 2020  sprom_3_0_0

1024    Jun 15 19:14:08 2020  sprom_cstruct_2_0_0

1024    Jun 15 19:14:40 2020  sprom_cstruct_3_0_0

4096    Jun 15 19:14:22 2020  vdc_2/

4096    Jun 15 19:14:22 2020  vdc_3/

4096    Jun 15 19:14:22 2020  vdc_4/

4096    Mar 30 22:31:55 2017  virt_strg_pool_bf_vdc_1/

4096    Mar 30 22:31:54 2017  virtual-instance/

3568    Jun 15 19:45:19 2020  vlan.dat

Usage for bootflash://sup-local

569184256 bytes used

1079439360 bytes free

1648623616 bytes total

However, the NX-OS 9.3(4) binary image file is about 1.6 gigabytes in size. As a result, you are unable to copy the full NX-OS 9.3(4) binary image to the bootflash of this device.

N3K-C3064PQ# copy ftp://administrator@192.0.2.10/nxos.9.3.4.bin bootflash: vrf management

Password:

/bootflash/nxos.9.3.4.bin: Write could not complete, check free space on device

Error during copy

***** Transfer of file aborted *****

Copy failed. Removing file nxos.9.3.4.bin

In order to work around this, you must copy the full NX-OS 9.3(4) binary image file to a USB flash drive inserted in the Nexus device. A 16 gigabyte USB flash drive is inserted in the USB port of the chassis. The full NX-OS 9.3(4) binary image file is copied to the USB flash drive via FTP.

Note: The USB port on the Nexus 3064PQ-10GE device can be located here. Refer to the Hardware Installation Guide for your specific Nexus 3000, 3100, or 3500 devices for more details about the location of the USB port on your specific Nexus device.

N3K-C3064PQ# copy ftp://administrator@192.0.2.10/nxos.9.3.4.bin usb1: vrf management

Password:

***** Transfer of file Completed Successfully *****

Copy complete, now saving to disk (please wait)...

Copy complete.

Confirm that the full 1.6 gigabytes NX-OS 9.3(4) binary image file is copied to the USB flash drive without issues.

N3K-C3064PQ# dir usb1:

1679871488    Jun 16 00:26:02 2020  nxos.9.3.4.bin

Usage for usb1://sup-local

1679884288 bytes used

13829111808 bytes free

15508996096 bytes total

You can execute the Compact Image procedure with the use of the aforementioned install all nxos usb1:nxos.9.3.4.bin compact command in order to reduce the file size of the NX-OS 9.3(4) binary image file.

N3K-C3064PQ# install all nxos usb1:nxos.9.3.4.bin compact

Installer will perform compatibility check first. Please wait.

Compacting usb1:/nxos.9.3.4.bin

......................................................

Compact usb1:/nxos.9.3.4.bin done

After the Compact Image procedure is complete, the NX-OS 9.3(4) binary image file size is considerably smaller (around 579 megabytes).

N3K-C3064PQ# dir usb1:

579377951    Jun 16 00:12:34 2020  nxos.9.3.4.bin

Usage for usb1://sup-local

579387392 bytes used

14929608704 bytes free

15508996096 bytes total

Recall that the bootflash has about 1.07 gigabytes of free space available. Now that the NX-OS 9.3(4) binary image file size has been reduced to 579 megabytes, you can copy the NX-OS 9.3(4) binary image from the USB flash drive to the bootflash of the Nexus device.

N3K-C3064PQ# copy usb1:nxos.9.3.4.bin bootflash:

Copy progress 100% 579377KB

Copy complete, now saving to disk (please wait)...

Copy complete.

N3K-C3064PQ# dir bootflash:

30261    Apr 03 16:28:46 2017  .n3k_pre_single_img_upd_config

4096    Jun 15 23:21:43 2020  .rpmstore/

4096    Feb 08 16:38:11 2017  .swtam/

362528    Jun 15 19:59:44 2020  20200615_195315_poap_29012_init.log

1890    Jun 15 22:30:33 2020  bios_daemon.dbg

0    Jun 15 19:43:24 2020  bootflash_sync_list

4096    Jun 15 19:43:36 2020  logflash/

4096    Jun 15 23:12:44 2020  lost+found/

471871960    Jun 15 23:32:10 2020  nxos.7.0.3.I7.8.bin

579377951    Jun 16 00:51:35 2020  nxos.9.3.4.bin

486    Jun 15 23:21:24 2020  patch_control.log

87    Jun 15 23:21:24 2020  patch_debug.log

0    Jun 15 19:48:16 2020  platform-sdk.cmd

4096    Jun 15 19:53:15 2020  scripts/

1024    Jun 15 22:32:48 2020  sprom_2_0_1

1024    Jun 15 22:32:48 2020  sprom_3_0_0

1024    Jun 15 19:14:08 2020  sprom_cstruct_2_0_0

1024    Jun 15 19:14:40 2020  sprom_cstruct_3_0_0

4096    Jun 15 19:14:22 2020  vdc_2/

4096    Jun 15 19:14:22 2020  vdc_3/

4096    Jun 15 19:14:22 2020  vdc_4/

4096    Mar 30 22:31:55 2017  virt_strg_pool_bf_vdc_1/

4096    Mar 30 22:31:54 2017  virtual-instance/

3568    Jun 15 19:45:19 2020  vlan.dat

Usage for bootflash://sup-local

1149136896 bytes used

499486720 bytes free

1648623616 bytes total

You can now proceed with the NX-OS software upgrade from NX-OS software release 7.0(3)I7(8) to NX-OS software release 9.3(4) with the use of a supported method. Refer to the target NX-OS software release's release notes (such as the Cisco Nexus 3000 Series NX-OS Release Notes, Release 9.3(4) document) for more information about supported upgrade methodologies.

Compact Image Procedure for NX-OS Binary Image File via SCP

After you upgrade to NX-OS software release 7.0(3)I5(2) or higher, you can execute the Compact Image procedure on an NX-OS binary image file that is actively being copied to the Nexus device's bootflash or a connected USB flash drive via SCP. This procedure can be executed with the copy scp: bootflash: compact command. This procedure is typically performed when you meet these conditions:

- There is not enough free space on the bootflash to copy the full target NX-OS binary image file to the bootflash.

- You are unable to perform the Compact Image procedure via USB for some reason (for example, you need to upgrade multiple switches simultaneously, you do not have hands-on access to the device, and so on).

Note: Only the SCP file transfer protocol is supported for this procedure. Other file transfer protocols (such as TFTP, FTP, and SFTP) do not support this procedure.

Use a Linux Host as an SCP Server

By default, any SSH-accessible Linux host can also act as an SCP server. If you are able to transfer the full target NX-OS binary image file to an SSH-accessible Linux host that is also reachable by the Nexus device you wish to upgrade using a file transfer protocol of your choice, the Nexus can use the Compact Image procedure via SCP to reduce the size of the target NX-OS binary image file when you copy it to the bootflash of the device or a connected USB flash drive.

When you construct the copy scp: bootflash: compact command for use against a Linux host acting as an SCP server, use the absolute file path for the location of the target NX-OS binary image file. For example, consider a server with these characteristics:

- Server IP: 192.0.2.10

- Server Username: administrator

- NX-OS Binary Image Absolute Filepath: /home/administrator/nxos.9.3.4.bin

- VRF: management

This command was constructed for these characteristics:

N3K-C3064PQ# copy scp://administrator@192.0.2.10/home/administrator/nxos.9.3.4.bin bootflash:

compact vrf management

Use a Nexus Device as an SCP Server

Nexus devices that run modern NX-OS software releases can be configured to act as an SCP server through the feature scp-server global configuration command. You can transfer the full NX-OS binary image file to the Nexus device with the use of the file transfer protocol of your choice, activate the SCP server feature, and use the Compact Image procedure via SCP to reduce the file size of the target NX-OS binary image file when you transfer it to the bootflash or connected USB flash drive of the Nexus device you would like to upgrade.

An example that demonstrates the configuration of this feature is shown here:

N3K# configure terminal

N3K(config)# feature scp-server

N3K(config)# end

N3K#

The SCP server feature is supported on all Nexus platforms that start with the NX-OS software releases listed in the table here.

Nexus Platform

NX-OS Software Release

Nexus 3000/3100

6.0(2)U1(1)

Nexus 3524/3548

6.0(2)A1(1)

Nexus 5000/6000

6.0(2)N1(1)

Nexus 7000/7700

5.1(1)

Nexus 9000

6.1(2)I1(1)

The example here demonstrates the usage of the Compact Image procedure via SCP on a Nexus 3064PQ-10GE device that runs NX-OS 7.0(3)I7(8) that is upgraded to NX-OS 9.3(4).

N3K-C3064PQ# show module

<snip>

Mod Ports             Module-Type                       Model          Status

--- ----- ------------------------------------- --------------------- ---------

1    64   48x10GE + 16x10G/4x40G Supervisor     N3K-C3064PQ-10GE      active *

Mod  Sw                Hw     Slot

---  ----------------  ------ ----

1    7.0(3)I7(8)       1.0    NA

The existing NX-OS 7.0(3)I7(8) binary image file has already been compacted per the instructions in the Compact Image Procedure for NX-OS Binary Image File on Bootflash section of this document. As a result, there are about 1.07 gigabytes of free space on the bootflash of the Nexus device.

N3K-C3064PQ# dir bootflash:

30261    Apr 03 16:28:46 2017  .n3k_pre_single_img_upd_config

4096    Jun 15 23:21:43 2020  .rpmstore/

4096    Feb 08 16:38:11 2017  .swtam/

362528    Jun 15 19:59:44 2020  20200615_195315_poap_29012_init.log

1890    Jun 15 22:30:33 2020  bios_daemon.dbg

0    Jun 15 19:43:24 2020  bootflash_sync_list

4096    Jun 15 19:43:36 2020  logflash/

4096    Jun 15 23:12:44 2020  lost+found/

471871960    Jun 15 23:32:10 2020  nxos.7.0.3.I7.8.bin

486    Jun 15 23:21:24 2020  patch_control.log

87    Jun 15 23:21:24 2020  patch_debug.log

0    Jun 15 19:48:16 2020  platform-sdk.cmd

4096    Jun 15 19:53:15 2020  scripts/

1024    Jun 15 22:32:48 2020  sprom_2_0_1

1024    Jun 15 22:32:48 2020  sprom_3_0_0

1024    Jun 15 19:14:08 2020  sprom_cstruct_2_0_0

1024    Jun 15 19:14:40 2020  sprom_cstruct_3_0_0

4096    Jun 15 19:14:22 2020  vdc_2/

4096    Jun 15 19:14:22 2020  vdc_3/

4096    Jun 15 19:14:22 2020  vdc_4/

4096    Mar 30 22:31:55 2017  virt_strg_pool_bf_vdc_1/

4096    Mar 30 22:31:54 2017  virtual-instance/

3568    Jun 15 19:45:19 2020  vlan.dat

Usage for bootflash://sup-local

569184256 bytes used

1079439360 bytes free

1648623616 bytes total

However, the NX-OS 9.3(4) binary image file is about 1.6 gigabytes in size. As a result, you are unable to copy the full NX-OS 9.3(4) binary image to the bootflash of this device.

N3K-C3064PQ# copy ftp://administrator@192.0.2.10/nxos.9.3.4.bin bootflash: vrf management

Password:

/bootflash/nxos.9.3.4.bin: Write could not complete, check free space on device

Error during copy

***** Transfer of file aborted *****

Copy failed. Removing file nxos.9.3.4.bin

You can execute the NX-OS Compact Image procedure via SCP with the use of the aforementioned copy scp: bootflash: compact command. In the example here, this command copies the NX-OS 9.3(4) binary image file from an SCP server at 192.0.2.10 through the management VRF with a username of administrator. This particular SCP server is a Linux host, and the NX-OS 9.3(4) binary image file is located at the absolute filepath /home/administrator/nxos.9.3.4.bin. You need to replace these parameters (username, password, SCP server IP address/FQDN, absolute filepath, and so on) with values relevant to your environment.

N3K-C3064PQ# copy scp://administrator@192.0.2.10/home/administrator/nxos.9.3.4.bin bootflash: compact vrf management

administrator@192.0.2.10's password:

Copy complete, now saving to disk (please wait)...

Copy complete.

After the Compact Image procedure via SCP is finished, the NX-OS 9.3(4) binary image file size is considerably smaller (around 579 megabytes).

N3K-C3064PQ# dir bootflash:

30261    Apr 03 16:28:46 2017  .n3k_pre_single_img_upd_config

4096    Jun 15 23:21:43 2020  .rpmstore/

4096    Feb 08 16:38:11 2017  .swtam/

362528    Jun 15 19:59:44 2020  20200615_195315_poap_29012_init.log

1890    Jun 15 22:30:33 2020  bios_daemon.dbg

0    Jun 15 19:43:24 2020  bootflash_sync_list

4096    Jun 15 19:43:36 2020  logflash/

4096    Jun 15 23:12:44 2020  lost+found/

471871960    Jun 15 23:32:10 2020  nxos.7.0.3.I7.8.bin

579377951    Jun 22 19:49:10 2020  nxos.9.3.4.bin

486    Jun 15 23:21:24 2020  patch_control.log

87    Jun 15 23:21:24 2020  patch_debug.log

0    Jun 15 19:48:16 2020  platform-sdk.cmd

4096    Jun 15 19:53:15 2020  scripts/

1024    Jun 15 22:32:48 2020  sprom_2_0_1

1024    Jun 15 22:32:48 2020  sprom_3_0_0

1024    Jun 15 19:14:08 2020  sprom_cstruct_2_0_0

1024    Jun 15 19:14:40 2020  sprom_cstruct_3_0_0

4096    Jun 15 19:14:22 2020  vdc_2/

4096    Jun 15 19:14:22 2020  vdc_3/

4096    Jun 15 19:14:22 2020  vdc_4/

4096    Mar 30 22:31:55 2017  virt_strg_pool_bf_vdc_1/

4096    Mar 30 22:31:54 2017  virtual-instance/

3568    Jun 15 19:45:19 2020  vlan.dat

Usage for bootflash://sup-local

1149136896 bytes used

499486720 bytes free

1648623616 bytes total

You can now proceed with the NX-OS software upgrade from NX-OS software release 7.0(3)I7(8) to NX-OS software release 9.3(4) with the use of a supported method. Refer to the target NX-OS software release's release notes (such as the Cisco Nexus 3000 Series NX-OS Release Notes, Release 9.3(4) document) for more information about supported upgrade methodologies.

Additional Information

If you are unable to use any of the previously mentioned three methods to execute the NX-OS Compact Image procedure, please open a support case with Cisco TAC for additional assistance.

Related Information

- YouTube - Nexus 3000, 3100, and 3500 NX-OS Compact Image Procedure Example

- Cisco Nexus 3000 Series Switches Install and Upgrade Guides

- Cisco Nexus 3000 Series NX-OS Software Upgrade and Downgrade Guide, Release 9.3(x)

- Cisco Nexus 3000 Series NX-OS Software Upgrade and Downgrade Guide, Release 9.2(x)

- Cisco Nexus 3000 Series NX-OS Software Upgrade and Downgrade Guide, Release 7.x

- Cisco Nexus 3500 Series NX-OS Software Upgrade and Downgrade Guide, Release 9.3(x)

- Cisco Nexus 3500 Series NX-OS Software Upgrade and Downgrade Guide, Release 9.2(x)

- Cisco Nexus 3500 Series NX-OS Software Upgrade and Downgrade Guide, Release 7.x

- Cisco Nexus 3000 Series Switches Release Notes

- Technical Support & Documentation - Cisco Systems