Cisco Nexus 9000 シリーズ NX-OS ソフトウェア アップグレードおよびダウングレード ガイド、リリース 10.6(x)

PDF

Cisco Nexus 9000 シリーズ NX-OS ソフトウェア アップグレードおよびダウングレード ガイド、リリース 10.6(x)

Dandified YUM コマンド

Want to summarize with AI?

Log in

このセクションで は、NX- OSリリース 10.1(x) 以降、YUM コマンドに置き換わったDundified YUM(DNF)コマンドについて説明します。


Nexus 9000 スイッチでは、DNF(Dandified YUM)は、NX- OS環境内のモジュラ ソフトウェア コンポーネント(RPM)を管理するために使用されるパッケージ マネージャです。NX- OSリリース 10.1(x) 以降、DNF はオプション機能の主要なツールとして YUM を置き換え、完全なシステムを実行せずに特定の機能(レイヤー 3、BGP、または OSPF など)をインストール、アップグレード、または削除できるようになりました。バイナリ アップグレード、またはスイッチのリロード。

Note

DNF コマンドは CTRL+C をサポートしていません。インストール コマンドは CTRL+C をサポートしています。 DNF コマンドを CTRL+C を使用して中断した場合は、/isan/bin/patching_utils.py --unlock を使用して手動クリーンアップを行う必要があります。


DNF コマンドを使用したパッケージ操作

このセクションでは、 DNF コマンドを使用してパッケージの操作を実行する方法について説明します。

ここでは、 DNF コマンドを使用してパッケージの操作を実行する方法について説明します:

Note
  • DNF コマンドは、ボックスの BASH シェルからのみアクセスできます。NX-OS VSH ターミナルからはアクセスできません。

  • sudo ユーザとして、スーパー ユーザ権限にアクセスできることを確認してください。


イメージのベース バージョン RPM を特定する

ベース RPM バージョンは、システム イメージにアーカイブされた、事前インストール済みの RPM です。

ls /rpms コマンドを使用して、イメージのベース バージョン RPM を特定します。

switch# ls /rpms

bfd-2.0.0.0-9.2.1.lib32_n9000.rpm                ins_tor_sdk_t2-1.0.0.0-9.2.0.77.lib32_n9000.rpm    mtx-netconf-agent-2.0.0.0-9.2.1.lib32_n9000.rpm   snmp-2.0.0.0-9.2.1.lib32_n9000.rpm
bgp-2.0.0.0-9.2.1.lib32_n9000.rpm                ins_tor_sdk_t3-1.0.0.0-9.2.0.77.lib32_n9000.rpm    mtx-restconf-agent-2.0.0.0-9.2.1.lib32_n9000.rpm  sr-2.0.0.0-9.2.1.lib32_n9000.rpm
container-tracker-2.0.0.0-9.2.1.lib32_n9000.rpm  isis-2.0.0.0-9.2.1.lib32_n9000.rpm                 mtx-telemetry-2.0.0.0-9.2.1.lib32_n9000.rpm       svi-2.0.0.0-9.2.1.lib32_n9000.rpm
eigrp-2.0.0.0-9.2.1.lib32_n9000.rpm              lacp-2.0.0.0-9.2.1.lib32_n9000.rpm                 nbproxy-2.0.0.0-9.2.1.lib32_n9000.rpm             tacacs-2.0.0.0-9.2.1.lib32_n9000.rpm
ext-eth-2.0.0.0-9.2.1.lib32_n9000.rpm            lldp-2.0.0.0-9.2.1.lib32_n9000.rpm                 ntp-2.0.0.0-9.2.1.lib32_n9000.rpm                 telemetry-2.3.4.0-9.2.1.lib32_n9000.rpm
fcoe-2.0.0.0-9.2.1.lib32_n9000.rpm               mcast-2.0.0.0-9.2.1.lib32_n9000.rpm                nxos-ssh-2.0.0.0-9.2.1.lib32_n9000.rpm            virtualization-2.0.0.0-9.2.1.lib32_n9000.rpm
fex-2.0.0.0-9.2.1.lib32_n9000.rpm                mpls-2.0.0.0-9.2.1.lib32_n9000.rpm                 ospf-2.0.0.0-9.2.1.lib32_n9000.rpm                vtp-2.0.0.0-9.2.1.lib32_n9000.rpm
fhrp-2.0.0.0-9.2.1.lib32_n9000.rpm               mtx-device-2.0.0.0-9.2.1.lib32_n9000.rpm           repodata                                          vxlan-2.0.0.0-9.2.1.lib32_n9000.rpm
guestshell-2.0.0.0-9.2.1.lib32_n9000.rpm         mtx-grpc-agent-2.0.0.0-9.2.1.lib32_n9000.rpm       rip-2.0.0.0-9.2.1.lib32_n9000.rpm
icam-2.0.0.0-9.2.1.lib32_n9000.rpm               mtx-infra-2.0.0.0-9.2.1.lib32_n9000.rpm            services-2.0.0.0-9.2.1.lib32_n9000.rpm

インストール済み RPM のリストをチェックする

dnf list installed コマンドを使用して機能 RPM とサード パーティ RPM をクエリして、 特定の RPM を grep 検索します。

機能 RPM の例を次に示します。

bash-4.2# dnf list installed | grep lib32_n9000 

bfd.lib32_n9000                        2.0.0.0-9.2.1           @groups-repo
core.lib32_n9000                       2.0.0.0-9.2.1           installed   
eth.lib32_n9000                        2.0.0.0-9.2.1           installed   
guestshell.lib32_n9000                 2.0.0.0-9.2.1           @groups-repo
lacp.lib32_n9000                       2.0.0.0-9.2.1           installed   
linecard2.lib32_n9000                  2.0.0.0-9.2.1           installed   
lldp.lib32_n9000                       2.0.0.0-9.2.1           installed   
mcast.lib32_n9000                      2.0.0.0-9.2.1           @groups-repo
mtx-device.lib32_n9000                 2.0.0.0-9.2.1           installed   
mtx-grpc-agent.lib32_n9000             2.0.0.0-9.2.1           installed   
mtx-infra.lib32_n9000                  2.0.0.0-9.2.1           installed   
mtx-netconf-agent.lib32_n9000          2.0.0.0-9.2.1           installed   
mtx-restconf-agent.lib32_n9000         2.0.0.0-9.2.1           installed   
mtx-telemetry.lib32_n9000              2.0.0.0-9.2.1           installed   
nbproxy.lib32_n9000                    2.0.0.0-9.2.1           installed   
ntp.lib32_n9000                        2.0.0.0-9.2.1           installed   
nxos-ssh.lib32_n9000                   2.0.0.0-9.2.1           installed   
ospf.lib32_n9000                       2.0.0.0-9.2.1           @groups-repo
platform.lib32_n9000                   2.0.0.0-9.2.1           installed   
snmp.lib32_n9000                       2.0.0.0-9.2.1           installed   
svi.lib32_n9000                        2.0.0.0-9.2.1           installed   
tacacs.lib32_n9000                     2.0.0.0-9.2.1           installed   
tor.lib32_n9000                        2.0.0.0-9.2.0.77        installed   
virtualization.lib32_n9000             2.0.1.0-9.2.1           @localdb    
vtp.lib32_n9000                        2.0.0.0-9.2.1           installed   
vxlan.lib32_n9000                      2.0.0.0-9.2.1           @groups-repo
...

インストール済み RPM の詳細を取得する

dnf info <rpmname> コマンドは、インストール済み RPM の詳細情報リストを出力します。

dnf info vxlan 

Loaded plugins: downloadonly, importpubkey, localrpmDB, patchaction, patching, protect-packages
groups-repo                                                                                                                                                                                              | 1.1 kB     00:00 ... 
localdb                                                                                                                                                                                                  |  951 B     00:00 ... 
patching                                                                                                                                                                                                 |  951 B     00:00 ... 
thirdparty                                                                                                                                                                                               |  951 B     00:00 ... 
Installed Packages
Name        : vxlan
Arch        : lib32_n9000
Version     : 2.0.0.0
Release     : 9.2.1
Size        : 6.4 M
Repo        : installed
From repo   : groups-repo
Summary     : Cisco NXOS VxLAN
URL         : http://cisco.com/
License     : Proprietary
Description : Provides VxLAN support

RPM のインストール

RPM をインストールすると、RPM がダウンロードされ、それぞれのプログラムがスイッチにコピーされます。これは、RPM をリモート サーバ(ネットワークで到達可能)からインストールする例を示しています。

bash-4.3# dnf install http://10.0.0.2/modularity/rpms/vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm
 
Loaded plugins: downloadonly, importpubkey, localrpmDB, patchaction, patching, protect-packages
groups-repo                                                                                                                                   | 1.1 kB     00:00 ... 
localdb                                                                                                                                       |  951 B     00:00 ... 
localdb/primary                                                                                                                               |  886 B     00:00 ... 
localdb                                                                                                                                                          1/1
patching                                                                                                                                      |  951 B     00:00 ... 
thirdparty                                                                                                                                    |  951 B     00:00 ... 
Setting up Install Process
vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm                                                                                                      | 1.6 MB     00:00     
Examining /var/tmp/yum-root-RaANgb/vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm: vxlan-2.0.1.0-9.2.1.lib32_n9000
Marking /var/tmp/yum-root-RaANgb/vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package vxlan.lib32_n9000 0:2.0.1.0-9.2.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================================
 Package                   Arch                            Version                                   Repository                                    Size
=====================================================================================================================================================================
Installing:
vxlan                     lib32_n9000                     2.0.1.0-9.2.1                        /vxlan-2.0.1.0-9.2.1.lib32_n9000                     6.4 M
Transaction Summary
=====================================================================================================================================================================
Install       1 Package

Total size: 6.4 M
Installed size: 6.4 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : vxlan-2.0.1.0-9.2.1.lib32_n9000                                                                                                              1/1 
starting pre-install package version mgmt for vxlan
pre-install for vxlan complete
starting post-install package version mgmt for vxlan
post-install for vxlan complete

Installed:
  vxlan.lib32_n9000 0:2.0.1.0-9.2.1                                                                                                                             

Complete! 

この例は、RPM をローカル ブートフラッシュからインストールする場合の例を示しています。

sudo dnf install /bootflash/vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm 

Loaded plugins: downloadonly, importpubkey, localrpmDB, patchaction, patching, protect-packages
groups-repo                                                                                                                                                                                              | 1.1 kB     00:00 ... 
localdb                                                                                                                                                                                                  |  951 B     00:00 ... 
patching                                                                                                                                                                                                 |  951 B     00:00 ... 
thirdparty                                                                                                                                                                                               |  951 B     00:00 ... 
Setting up Install Process
Examining /bootflash/vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm: vxlan-2.0.1.0-9.2.1.lib32_n9000
Marking /bootflash/vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm as an update to vxlan-2.0.0.0-9.2.1.lib32_n9000
Resolving Dependencies
--> Running transaction check
---> Package vxlan.lib32_n9000 0:2.0.0.0-9.2.1 will be updated
---> Package vxlan.lib32_n9000 0:2.0.1.0-9.2.1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================================
 Package                                  Arch                                           Version                                                 Repository                                                                Size
================================================================================================================================================================================================================================
Updating:
 vxlan                                    lib32_n9000                                    2.0.1.0-9.2.1                                      /vxlan-2.0.1.0-9.2.1.lib32_n9000                                    6.4 M

Transaction Summary
================================================================================================================================================================================================================================
Upgrade       1 Package

Total size: 6.4 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : vxlan-2.0.1.0-9.2.1.lib32_n9000                                                                                                                                                                         1/2 
starting pre-install package version mgmt for vxlan
pre-install for vxlan complete
starting post-install package version mgmt for vxlan
post-install for vxlan complete
  Cleanup    : vxlan-2.0.0.0-9.2.1.lib32_n9000                                                                                                                                                                         2/2 

Updated:
  vxlan.lib32_n9000 0:2.0.1.0-9.2.1                                                                                                                                                                                        

Complete!

次には、RPM がリポジトリ内で利用可能な場合の RPM のインストールを示しています。

dnf install eigrp 

RPM のアップグレード

このトピックは、RPM をリモート サーバ(ネットワークで到達可能)からアップグレードする場合の例を提供します。

bash-4.3# dnf upgrade http://10.0.0.2/modularity/rpms/vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm 

Loaded plugins: downloadonly, importpubkey, localrpmDB, patchaction, patching, protect-packages
groups-repo                                                                                                                                   | 1.1 kB     00:00 ... 
localdb                                                                                                                                       |  951 B     00:00 ... 
patching                                                                                                                                      |  951 B     00:00 ... 
thirdparty                                                                                                                                    |  951 B     00:00 ... 
Setting up Upgrade Process
vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm                                                                                                      | 1.6 MB     00:00     
Examining /var/tmp/yum-root-RaANgb/vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm: vxlan-2.0.1.0-9.2.1.lib32_n9000
Marking /var/tmp/yum-root-RaANgb/vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm as an update to vxlan-2.0.0.0-9.2.1.lib32_n9000
Resolving Dependencies
--> Running transaction check
---> Package vxlan.lib32_n9000 0:2.0.0.0-9.2.1 will be updated
---> Package vxlan.lib32_n9000 0:2.0.1.0-9.2.1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================================
 Package                   Arch                            Version                                   Repository                                    Size
=====================================================================================================================================================================
Updating:
vxlan                     lib32_n9000                     2.0.1.0-9.2.1                        /vxlan-2.0.1.0-9.2.1.lib32_n9000                     6.4 M
Transaction Summary
=====================================================================================================================================================================
Upgrade       1 Package

Total size: 6.4 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
busybox-1.23.2-r0.0.x86_64 has missing requires of busybox-syslog
  Updating   : vxlan-2.0.1.0-9.2.1.lib32_n9000                                                                                                              1/2 
starting pre-install package version mgmt for vxlan
pre-install for vxlan complete
starting post-install package version mgmt for vxlan
post-install for vxlan complete
  Cleanup    : vxlan-2.0.0.0-9.2.1.lib32_n9000                                                                                                              2/2 

Updated:
  vxlan.lib32_n9000 0:2.0.1.0-9.2.1                                                                                                                             

Complete!

この例は、RPM をローカル ブートフラッシュからアップグレードする場合の例を示しています。

sudo dnf upgrade /bootflash/vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm
 
Loaded plugins: downloadonly, importpubkey, localrpmDB, patchaction, patching, protect-packages
groups-repo                                                                                                                                                                                              | 1.1 kB     00:00 ... 
localdb                                                                                                                                                                                                  |  951 B     00:00 ... 
patching                                                                                                                                                                                                 |  951 B     00:00 ... 
thirdparty                                                                                                                                                                                               |  951 B     00:00 ... 
Setting up Upgrade Process
Examining /bootflash/vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm: vxlan-2.0.1.0-9.2.1.lib32_n9000
Marking /bootflash/vxlan-2.0.1.0-9.2.1.lib32_n9000.rpm as an update to vxlan-2.0.0.0-9.2.1.lib32_n9000
Resolving Dependencies
--> Running transaction check
---> Package vxlan.lib32_n9000 0:2.0.0.0-9.2.1 will be updated
---> Package vxlan.lib32_n9000 0:2.0.1.0-9.2.1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================================
 Package                                  Arch                                           Version                                           Repository                                                                Size
================================================================================================================================================================================================================================
Updating:
vxlan                                    lib32_n9000                                    2.0.1.0-9.2.1                                      /vxlan-2.0.1.0-9.2.1.lib32_n9000                                    6.4 M

Transaction Summary
================================================================================================================================================================================================================================
Upgrade       1 Package

Total size: 6.4 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : vxlan-2.0.1.0-9.2.1.lib32_n9000                                                                                                                                                                         1/2 
starting pre-install package version mgmt for vxlan
pre-install for vxlan complete
starting post-install package version mgmt for vxlan
post-install for vxlan complete
  Cleanup    : vxlan-2.0.0.0-9.2.1.lib32_n9000                                                                                                                                                                         2/2 

Updated:
  vxlan.lib32_n9000 0:2.0.1.0-9.2.1                                                                                                                                                                                        

Complete!

これは、RPM がいずれかのリポジトリ内で利用可能な場合の RPM のアップグレードの例を示しています。

dnf upgrade eigrp 

RPM のダウングレード

このトピックは、RPM をリモート サーバ(ネットワークで到達可能)からダウングレードする場合の例を提供します。

sudo dnf
 downgrade vxlan-2.0.0.0-9.2.1.lib32_n9000 

Loaded plugins: downloadonly, importpubkey, localrpmDB, patchaction, patching, protect-packages
Setting up Downgrade Process
groups-repo                                                                                                                                                                                              | 1.1 kB     00:00 ... 
localdb                                                                                                                                                                                                  |  951 B     00:00 ... 
localdb/primary                                                                                                                                                                                          | 1.3 kB     00:00 ... 
localdb                                                                                                                                                                                                                     2/2
patching                                                                                                                                                                                                 |  951 B     00:00 ... 
thirdparty                                                                                                                                                                                               |  951 B     00:00 ... 
Resolving Dependencies
--> Running transaction check
---> Package vxlan.lib32_n9000 0:2.0.0.0-9.2.1 will be a downgrade
---> Package vxlan.lib32_n9000 0:2.0.1.0-9.2.1 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================================
 Package                                         Arch                                                  Version                                                Repository                                             Size
================================================================================================================================================================================================================================
Downgrading:
vxlan                                           lib32_n9000                                           2.0.0.0-9.2.1                                           groups-repo                                           1.6 M
Transaction Summary
================================================================================================================================================================================================================================
Downgrade     1 Package

Total download size: 1.6 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : vxlan-2.0.0.0-9.2.1.lib32_n9000                                                                                                                                                                         1/2 
starting pre-install package version mgmt for vxlan
pre-install for vxlan complete
starting post-install package version mgmt for vxlan
post-install for vxlan complete
  Cleanup    : vxlan-2.0.1.0-9.2.1.lib32_n9000                                                                                                                                                                         2/2 

Removed:
  vxlan.lib32_n9000 0:2.0.1.0-9.2.1                                                                                                                                                                                        

Installed:
  vxlan.lib32_n9000 0:2.0.0.0-9.2.1                                                                                                                                                                                        

Complete!

この例は、RPM をローカル ブートフラッシュからダウングレードする場合の例を示しています。

dnf downgrade /bootflash/eigrp-2.0.0-9.2.1.lib32_n9000.rpm 

これは、RPM がいずれかのリポジトリ内で利用可能な場合の RPM のダウングレードの例を示しています。

dnf downgrade eigrp
 

RPM を削除

RPM を削除すると、RPM がアンインストールされ、機能のコンフィグレーション コマンドがすべて削除されます。RPM を削除するには、dnf erase <rpm> コマンドを使用します。

bash-4.2# sudo dnf erase vxlan 

Loaded plugins: downloadonly, importpubkey, localrpmDB, patchaction, patching, protect-packages
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package vxlan.lib32_n9000 0:2.0.1.0-9.2.1 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================================
Package   Arch   Version  RepositorySize
================================================================================================================================================================================================================================
Removing:
vxlan     lib32_n9000    2.0.1.0-9.2.1    @/vxlan-2.0.1.0-9.2.1.lib32_n9000  6.4 M
Transaction Summary
================================================================================================================================================================================================================================
Remove1 Package

Installed size: 6.4 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing    : vxlan-2.0.1.0-9.2.1.lib32_n9000 1/1 
starting pre-remove package version mgmt for vxlan
pre-remove for vxlan complete

Removed:
vxlan.lib32_n9000 0:2.0.1.0-9.2.1

Complete!

DNF グループのサポート

DNF グループは、

  • 管理者によるパッケージの管理を簡素化、より高度な柔軟性を提供、

  • 柔軟性を向上し、

  • 管理者がパッケージのコレクションを論理的なグループとして管理することを可能にします。

DNF のグループのサポートは、パッケージ管理の一部です。

管理者は、パッケージ(RPM)のリストを論理グループにグループ化して、さまざまな操作を実行することができます。DNF がサポートするグループ コマンドは、

  • grouplist

  • groupinfo

  • groupinstall

  • groupremove 、および

  • groupupdateの形式に従います。

DNF のグループは、大きく分けて、レイヤ 2、レイヤ 3、ルーティング、および管理として分類できます。


利用可能のパッケージ グループの表示のグループリスト コマンド

Linux では、複数のパッケージを特定のグループにまとめることができます。dnf でパッケージを個別にインストールするのではなく、特定のグループをインストールして、そのグループに属するすべての関連パッケージをインストールできます。たとえば、使用可能なグループをすべてリストするには dnf grouplist コマンドを使用します。

dnfgrouplist のコマンドを使用して Linux で使用可能なすべてのパッケージ グループを一覧表示します。

bash-4.4# dnf grouplist 
Last metadata expiration check: 0:00:00 ago on Fri 08 Mar 2024 12:26:33 PM UTC.                             ] ---  B/s |   0  B     --:-- ETA
Available Groups:
   management
   routing
   L2
   L3
bash-4.4#

パッケージ グループの内容を表示する Groupmembers コマンド

dnf groupinfo コマンドを使用して説明とパッケージ グループのコンテンツを表示します。

このコマンドは、グループの機能メンバのリストを出力します。

bash-4.4# dnf groupinfo l2 

Last metadata expiration check: 0:00:00 ago on Fri 08 Mar 2024 12:27:44 PM UTC.                             ] ---  B/s |   0  B     --:-- ETA

Group: L2
 Mandatory Packages:
   lacp
   lldp
   svi
   vtp
bash-4.4#

メンバー RPM のインストールおよびアップグレード用の groupinstall コマンド

このコマンドは、メンバ RPM のインストールとアップグレードの両方に使用します。メンバーがインストールされていない場合は、使用可能な最も高いバージョンがインストールされます。メンバーがすでにインストールされていてより高いバージョンの RPM が使用可能である場合、このコマンドでそのメンバーがアップグレードされます。

bash-4.4# dnf groupinstall l3 
Last metadata expiration check: 0:00:00 ago on Fri 08 Mar 2024 12:38:05 PM UTC.                             ] ---  B/s |   0  B     --:-- ETA
Not a redundant system. Nothing todo
Dependencies resolved.
==============================================================================================================================================
 Group                                            Packages                                                                                   
==============================================================================================================================================
Marking packages as installed by the group:
 @L3                                              bfd                                                                                        
Is this ok [y/N]: y
Complete!
Install operation 10 completed successfully at Fri Mar  8 12:38:08 2024.

[####################] 100%

パッケージ グループ アップデートの Groupupdate コマンド

dnf groupupdate コマンドを使用して、既存のインストール済みグループ パッケージをすべて更新します。

bash-4.4# dnf groupupdate l3                                                                                                                                       
Last metadata expiration check: 0:00:00 ago on Wed 13 Mar 2024 12:30:11 PM UTC.                                                 ] ---  B/s |   0  B     --:-- ETA 
Dependencies resolved.                                                                                                                                            
=================================================================================================================================================================$
 Group                                                  Packages
=================================================================================================================================================================$
Marking packages as installed by the group:
 @L3                                                    bfd
=================================================================================================================================================================$
 Package                        Arch                                      Version                                    Repository                              Size
=================================================================================================================================================================$
Installing group packages:
 bfd                            lib32_64_n9000                            2.0.0.0-10.4.3                             groups-repo                            562 k

Transaction Summary
=================================================================================================================================================================$
Install  1 Package

Total size: 562 k
Installed size: 2.3 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                          1/1
  Running scriptlet: bfd-2.0.0.0-10.4.3.lib32_64_n9000                                                                                                        1/1
starting pre-install package version mgmt for bfd
pre-install for bfd complete
  Installing       : bfd-2.0.0.0-10.4.3.lib32_64_n9000                                                                                                        1/1
  Running scriptlet: bfd-2.0.0.0-10.4.3.lib32_64_n9000                                                                                                        1/1
starting post-install package version mgmt for bfd
post-install for bfd complete
  Verifying        : bfd-2.0.0.0-10.4.3.lib32_64_n9000                                                                                                        1/1

Installed:
  bfd.lib32_64_n9000 2.0.0.0-10.4.3

Complete!
Install operation 14 completed successfully at Wed Mar 13 12:30:23 2024.

[####################] 100%
bash-4.4#

グループを削除するための Grouperase コマンド

すべての RPM メンバーまたは、グループを削除するには、dnf grouperase コマンドを使用します。

bash-4.4# dnf grouperase l3
Dependencies resolved.
==============================================================================================================================================
 Group                                            Packages                                                                                   
==============================================================================================================================================
Marking packages as removed by the group:
 @L3                                              bfd                                                                                        
==============================================================================================================================================
 Package                    Arch                                  Version                                Repository                      Size
==============================================================================================================================================
Removing:
 bfd                        lib32_64_n9000                        2.0.0.0-10.4.3                         @System                        2.3 M

Transaction Summary
==============================================================================================================================================
Remove  1 Package

Freed space: 2.3 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                      1/1 
  Running scriptlet: bfd-2.0.0.0-10.4.3.lib32_64_n9000   
starting pre-remove package version mgmt for bfd
pre-remove for bfd complete
  Erasing          : bfd-2.0.0.0-10.4.3.lib32_64_n9000                                                                                    1/1 
  Running scriptlet: bfd-2.0.0.0-10.4.3.lib32_64_n9000                                                                                    1/1 
starting post-remove package version mgmt for bfd
post-remove for bfd complete

    Verifying        : bfd-2.0.0.0-10.4.3.lib32_64_n9000                                                                                    1/1  

Removed:
  bfd.lib32_64_n9000 2.0.0.0-10.4.3                                                                                                           Complete!
Install operation 11 completed successfully at Fri Mar  8 12:38:41 2024.

[####################] 100%
bash-4.4#

リポジトリを特定する

dnf repolist all コマンドは、スイッチに存在するリポジトリに加え、これらのリポジトリに含まれる RPM の数をリストします。

bash-4.3# dnf repolist all 

Loaded plugins: downloadonly, importpubkey, localrpmDB, patchaction, patching, protect-packages
groups-repo                                                                                                                                                                                              | 1.1 kB     00:00 ... 
localdb                                                                                                                                                                                                  |  951 B     00:00 ... 
patching                                                                                                                                                                                                 |  951 B     00:00 ... 
thirdparty                                                                                                                                                                                               |  951 B     00:00 ... 
repo id                                                                                             repo name                                                                                                        status
groups-repo                                                                                         Groups-RPM Database                                                                                              enabled: 37
localdb                                                                                             Local RPM Database                                                                                               enabled:  6
patching                                                                                            Patch-RPM Database                                                                                               enabled:  0
thirdparty                                                                                          Thirdparty RPM Database                                                                                          enabled:  0
open-nxos                                                                                           open-nxos                                                                                                        disabled
repolist: 43

インストールされている DNF バージョン

インストールされている DNF のバージョンを表示するには、dnf --version コマンドを使用します。

dnf --version 

3.4.3
Installed: rpm-5.4.14-r0.0.x86_64 at 2018-06-02 13:04
Built    : Wind River <info@windriver.com> at 2018-04-27 08:36
Committed: Wind River <info@windriver.com> at 2018-04-27

Installed: yum-3.4.3-r9.0.x86_64 at 2018-06-02 13:05
Built    : Wind River <info@windriver.com> at 2018-04-27 08:36
Committed: Wind River <info@windriver.com> at 2018-04-27

NX-OS コマンドの DNF コマンドへのマッピング

表は、NX-OS コマンドとそれに対応する DNF コマンドを示しています。

Table 1. パッチ適用コマンド リファレンス

NX-OS マンド

DNF コマンド

show install inactive

dnf list --patch-only available

show install active

dnf list --patch-only installed

show install committed

dnf list --patch-only committed

show install packages

dnf list --patch-only

show install pkg-info

dnf info --patch-only

show install log

dnf history --show-patch-log

ここで log_cmd は次のとおりです。

  • opid:ある操作 ID に固有なログ

  • last:最新の操作のログを示します。

  • reverse:逆の順序でログを表示します。

  • detail:詳細ログを表示します。

  • from:特定の操作 ID 以降のログを示します。

clear install log

dnf history --clear-patch-log=

ここで clear_log_cmd は次のとおりです。

  • all:ログを完全にクリアします。

  • :この操作 ID 以降のログをクリアします。

install add

dnf install --add bootflash:/

install remove

dnf install --remove

install remove inactive

dnf install --remove all

install activate

dnf install --no-persist  --nocommit

Note

デフォルトでは、すべてのパッケージがアクティブ化され、コミットされます。

install deactivate

dnf erase --nocommit

Note

デフォルトでは、すべてのパッケージが非アクティブ化され、コミットされます。

install commit

dnf install --commit

Install commit

dnf install --commit all