【Paloalto】CLIでPAN-OSのOSバージョンを変更してみた

Paloalto Paloalto
この記事は約18分で読めます。

CLIでPAN-OSのOSバージョンを変更してみました。

今回は仮想アプライアンスとして palaolto を利用しており、PAN-OS:11.2.5PAN-OS:11.2.8 へと変更してみました。

広告

1.CLIでPAN-OSのバージョンを変更する

1-1.現在のOSバージョンを確認する

以下のコマンドをオペレーショナルモードで実行して、現在のOSバージョンを確認します。

 # ページング機能を無効化
set cli pager off

 # OSバージョン確認
show system info

1-1-1.コマンド実行結果(OSバージョン確認)

hogeuser@host1> show system info

hostname: host1
ip-address: 10.0.0.4

 ~~~中略~~~

vm-license: VM-SERIES-4
vm-cap-tier: T2-14GB
vm-cpu-count: 4
vm-memory: 14351104
vm-mode: Microsoft Azure
cloud-mode: cloud
sw-version: 11.2.5

 ~~~中略~~~

duplicate-ip: Disabled
device-certificate-status: Valid

hogeuser@host1>

sw-version: 11.2.5」の部分から、現在のOSバージョンが分かります。

1-2.利用可能なソフトウェアバージョン(OSバージョン)を確認する

以下のコマンドで利用可能なソフトウェアバージョン(OSバージョン)を確認します。
このコマンドもオペレーショナルモードで実行します。

request system software check

1-2-1.コマンド実行結果(利用可能なソフトウェアバージョンの確認)

hogeuser@host1> request system software check

Version                          Size    Released on          Downloaded
---------------------------------------------------------------------------
11.2.8                           781MB   2025/08/21 08:37:01  no
11.2.7                           758MB   2025/06/18 08:33:24  no
11.2.7-h2                        759MB   2025/08/07 08:26:44  no
11.2.7-h1                        759MB   2025/07/23 12:08:34  no
11.2.6                           755MB   2025/05/07 10:11:38  no
11.2.5                           774MB   2025/02/20 11:44:50  yes
11.2.4-h11                       707MB   2025/08/12 12:06:53  no

 ~~~中略~~~

7.1.1                            221MB   2016/04/18 08:01:40  no
7.1.0                            549MB   2016/03/29 19:43:48  no

hogeuser@host1>

この結果から、「11.2.8」は利用可能であることが分かりますし、同時にこのpaloaltoにはまだダウンロードされていないことも分かります。

1-3.目的のOSバージョンをダウンロードする

以下のコマンドでダウンロードします。

request system software download version <OSバージョン>

1-3-1.コマンド実行結果(目的のOSバージョンをダウンロード)

hogeuser@host1> request system software download version 11.2.8

Download job enqueued with jobid 16
16

hogeuser@host1>

実行すると上記のようにジョブ番号が返されます。
なのでそのジョブ番号を利用して現在のステータスを確認することができます。

ジョブ番号を利用したステータス確認は以下のコマンドとなります。

show jobs id <ジョブ番号>

今回はジョブ番号が「5」でしたので、その番号を調べてみます。

hogeuser@host1> show jobs id 16

Enqueued              Dequeued           ID                              Type                         Status Result Completed
------------------------------------------------------------------------------------------------------------------------------
2025/08/28 01:20:29   01:20:29           16                            Downld                            ACT   PEND        99%
Warnings:

Details:Successfully downloaded
 Software version: 11.2.8
Preloading into software manager



hogeuser@host1>

すぐに実行するとこのように [Result] が PEND、[Completed] が 99% となっており、まだ完了していない状態となっています。

その後少し時間を空けて実行してみると [Result] が FIN、[Completed] に時間が表示され、ダウンロードが完了したことが確認できます。

ogeuser@host1> show jobs id 16

Enqueued              Dequeued      ID  ~~省略~~  Type   ~~省略~~  Status Result Completed
------------------------------------------------------------------------------------------
2025/08/28 01:20:29   01:20:29      16          Downld               FIN     OK 01:20:42
Warnings:

Details:Successfully downloaded
 Software version: 11.2.8
Preloading into software manager
Successfully loaded into software manager



hogeuser@host1>

改めてダウンロードされたソフトウェアバージョンを確認してみると、「11.2.8」がダウンロードされていることが確認できます。

hogeuser@host1> request system software check

Version                          Size    Released on          Downloaded
---------------------------------------------------------------------------
11.2.8                           781MB   2025/08/21 08:37:01  yes
11.2.7                           758MB   2025/06/18 08:33:24  no
11.2.7-h2                        759MB   2025/08/07 08:26:44  no
11.2.7-h1                        759MB   2025/07/23 12:08:34  no
11.2.6                           755MB   2025/05/07 10:11:38  no
11.2.5                           774MB   2025/02/20 11:44:50  yes
11.2.4-h11                       707MB   2025/08/12 12:06:53  no

1-4.OSバージョンをインストールする

以下のコマンドでインストールします。

request system software install version <OSバージョン>

1-4-1.コマンド実行結果(OSバージョンをインストール)

hogeuser@host1> request system software install version 11.2.8
Executing this command will install a new version of software. It will not take effect until system is restarted. Warning: PAN-OS install should be performed in a maintenance window to avoid any disruption in traffic. If the system is part of an HA configuration, put it in suspended state before starting the installation. Do you want to continue? (y or n)


Software install job enqueued with jobid 17. Run 'show jobs id 17' to monitor its status. Please reboot the device after the installation is done.
17

hogeuser@host1>

ダウンロードと同じようにジョブ番号が払い出されるので、ジョブ番号を使って状態を確認します。

・インストール途中の状態
hogeuser@host1> show jobs id 20

Enqueued              Dequeued           ID  ~~省略~~  Type   ~~省略~~   Status Result Completed
------------------------------------------------------------------------------------------------
2025/08/28 01:42:30   01:42:30           20      SWInstall                ACT   PEND        51%
Warnings:

Details:


hogeuser@host1>

もし、[Result] が FAIL となり、以下のようなエラーが出ていたら「3.インストール時にエラーが出た場合」を参照して解消してください。

Details:Failed to install 11.2.8 with the following errors.
SW version is 11.2.8
Nothing pending to cancel
Error: HA failover mode retrieved: None
Upgrading from 11.2.5 to 11.2.8 requires a content version of 8921 or greater and found 8902-9003.

Failed to install   version  11.2.8  type  panos
・インストール後の状態
hogeuser@host1> show jobs id 20

Enqueued              Dequeued           ID  ~~省略~~  Type   ~~省略~~   Status Result Completed
------------------------------------------------------------------------------------------------
2025/08/28 01:42:30   01:42:30           20      SWInstall                 FIN      OK 01:46:42
Warnings:

Details:Software installation of version 11.2.8 successfully completed. Please reboot to switch to the new version.




hogeuser@host1>

[Result] が OK となっていたらインストール完了です。

1-5.OSの再起動

インストールが完了したら再起動が必要となりますので以下のコマンドで実行します。

request restart system

1-5-1.コマンド実行結果(OSの再起動)

hogeuser@host1> request restart system
Executing this command will disconnect the current session. Do you want to continue? (y or n)

Broadcast message from root (pts/3) (Thu Aug 28 01:43:45 2025):

The system is going down for reboot NOW!
Connection to xxx.xxx.xxx.xxx closed.

C:\>

再起動に伴って、一時的にセッションが切れるので時間をおいて再度接続してください。

1-6.再起動後にOSバージョンを確認する

再起動後に再度OSバージョンを確認します。

hogeuser@host1> show system info

hostname: host1
ip-address: 10.0.0.4

 ~~~中略~~~

m-license: VM-SERIES-4
vm-cap-tier: T2-14GB
vm-cpu-count: 4
vm-memory: 14351104
vm-mode: Microsoft Azure
cloud-mode: cloud
sw-version: 11.2.8

 ~~~中略~~~

device-certificate-status: Valid

hogeuser@host1>

11.2.8」になっていることを確認できました。

これでOSバージョンの変更は完了です。

2.[参考] マイナーバージョンを変更する際には基礎イメージとなるバージョンが必要となる

例えば、PAN-OS:10.1.8PAN-OS:10.2.3 というように、マイナーバージョンまたぐ変更する場合には、マイナーバージョンの基礎イメージとなるバージョンが必須となる場合があります。
上記では、基礎イメージとなるバージョンは10.2.0です。

・「10.2.0」がダウンロードされていない状態で「10.2.3」をダウンロードをしてみます。

hogeuser@host1> request system software download version 10.2.3

Download job enqueued with jobid 4
4

hogeuser@host1>

ダウンロードジョブを確認すると、ダウンロードが進んでいるように見えますが、

hogeuser@host1> show jobs id 4

Enqueued              Dequeued           ID  ~~省略~~  Type   ~~省略~~   Status Result Completed
------------------------------------------------------------------------------------------------
2022/12/26 18:55:34   18:55:34            4         Downld                ACT   PEND        99%
Warnings:

Details:Successfully downloaded
Preloading into software manager



hogeuser@host1>

少し見えづらいですが「Result」が「FAIL」となっており、失敗したことが分かります。

hogeuser@host1> show jobs id 4

Enqueued              Dequeued           ID  ~~省略~~  Type   ~~省略~~   Status Result Completed
------------------------------------------------------------------------------------------------
2022/12/26 18:55:34   18:55:34            4         Downld                FIN   FAIL 18:55:43
Warnings:

Details:Successfully downloaded
Preloading into software manager
The required '10.2.0' base image must be loaded before this image can be loaded.  You do not have to install or run the base image, only download it.  Once the base is loaded, re-download your target image.

Failed to load into software manager. Please retry.
Post processing failed. Please retry.



hogeuser@host1>

なので、この場合には「The required ‘10.2.0’ base image must be loaded before this image can be loaded.」という表示にも記載がある通り、「10.2.0」にバージョンアップをしてから「10.2.3」にバージョンアップをする必要があります。

3.インストール時にエラーが出た場合

今回、最初にインストールコマンド(request system software install version XX.XX.XX)を実行した際に以下のようなエラーが出ました。

hogeuser@host1> show jobs id 17

Enqueued              Dequeued           ID                              Type                         Status Result Completed
------------------------------------------------------------------------------------------------------------------------------
2025/08/28 01:25:19   01:25:19           17                         SWInstall                            FIN   FAIL 01:25:28
Warnings:

Details:Failed to install 11.2.8 with the following errors.
SW version is 11.2.8
Nothing pending to cancel
Error: HA failover mode retrieved: None
Upgrading from 11.2.5 to 11.2.8 requires a content version of 8921 or greater and found 8902-9003.

Failed to install   version  11.2.8  type  panos





hogeuser@host1>

ただ、エラー詳細を見ると「content version」が11.2.8の要件を満たせていないためエラーとなっていることが分かります。

設定を確認すると確かに古いバージョンになっているように見えました。

hogeuser@host1> show system info

 ~~~省略~~~

app-version: 8902-9003

 ~~~省略~~~

threat-version: 0

 ~~~省略~~~


hogeuser@host1>

なので、以下のコマンドでアップデートすることで対応できました。

request content upgrade download latest
request content upgrade install version latest

GUIでは以下の手順でアップデート可能です。

  1. [Device] → [Dynamic Updates] に移動
  2. 「Applications and Threats」の行で「Check Now」をクリック
  3. 最新バージョンを「Download」→「Install」
  4. インストール完了後、「Commit」を実行

アップデート後にバージョンを確認すると最新版になっていることが確認できます。

hogeuser@host1> show system info

 ~~~省略~~~

app-version: 9016-9614

 ~~~省略~~~

threat-version: 9016-9614

 ~~~省略~~~


hogeuser@host1>

この状態で再度インストールコマンドを実行すると問題なく実行可能です。

4.[参考] GUIでOSバージョンを変更する方法

GUIでOSバージョンを変更する方法は以下の記事にまとめていますので参考にしてください。