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

Paloalto Paloalto

CLIでPAN-OSのOSバージョンを変更してみました。
今回は仮想アプライアンスとして palaolto を利用しており、PAN-OS:10.1.8PAN-OS:10.2.0 へと変更してみました。

広告

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

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

以下のコマンドで現在のOSバージョンを確認します。

show system info

・実行結果

hogeuser@host1> show system info

hostname: host1
ip-address: 10.0.0.5

 ~~~中略~~~

vm-license: VM-300
vm-cap-tier: 9.0 GB
vm-cpu-count: 4
vm-memory: 14353972
vm-mode: Microsoft Azure
cloud-mode: cloud
sw-version: 10.1.8

 ~~~中略~~~

device-certificate-status: None

hogeuser@host1>

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

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

以下のコマンドで利用可能なソフトウェアバージョン(OSバージョン)を確認します。

request system software check

・実行結果

hogeuser@host1> request system software check

Version               Size          Released on Downloaded
-------------------------------------------------------------------------
11.0.0              1037MB  2022/11/17 08:45:28         no
10.2.3-h2            565MB  2022/12/13 10:27:27         no
10.2.3               545MB  2022/09/29 11:26:49         no
10.2.2               528MB  2022/06/07 10:21:50         no
10.2.2-h2            527MB  2022/08/18 09:06:37         no
10.2.2-h1           1010MB  2022/06/28 10:12:10         no
10.2.1               522MB  2022/04/18 13:11:04         no
10.2.0              1010MB  2022/02/27 19:32:20         no
10.1.8-h2            467MB  2022/12/19 13:12:16         no
10.1.8               461MB  2022/10/20 12:52:05        yes
10.1.7               461MB  2022/09/12 14:40:59         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>

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

広告

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

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

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

・実行結果

hogeuser@host1> request system software download version 10.2.0

Download job enqueued with jobid 5
5

hogeuser@host1>

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

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

show jobs id <ジョブ番号>

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

hogeuser@host1> show jobs id 5

Enqueued              Dequeued           ID  ~~省略~~  Type   ~~省略~~   Status Result Completed
------------------------------------------------------------------------------------------------
2022/12/26 19:14:35   19:14:35            5         Downld                ACT   PEND        99%
Warnings:

Details:Successfully downloaded
Preloading into software manager



hogeuser@host1>

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

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

hogeuser@host1> show jobs id 5

Enqueued              Dequeued           ID  ~~省略~~  Type   ~~省略~~   Status Result Completed
------------------------------------------------------------------------------------------------
2022/12/26 19:14:35   19:14:35            5         Downld                FIN     OK 19:14:46
Warnings:

Details:Successfully downloaded
Preloading into software manager
Successfully loaded into software manager



hogeuser@host1>

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

hogeuser@host1> request system software check

Version               Size          Released on Downloaded
-------------------------------------------------------------------------
11.0.0              1037MB  2022/11/17 08:45:28         no
10.2.3-h2            565MB  2022/12/13 10:27:27         no
10.2.3               545MB  2022/09/29 11:26:49         no
10.2.2               528MB  2022/06/07 10:21:50         no
10.2.2-h2            527MB  2022/08/18 09:06:37         no
10.2.2-h1           1010MB  2022/06/28 10:12:10         no
10.2.1               522MB  2022/04/18 13:11:04         no
10.2.0              1010MB  2022/02/27 19:32:20        yes
10.1.8-h2            467MB  2022/12/19 13:12:16         no
10.1.8               461MB  2022/10/20 12:52:05        yes
10.1.7               461MB  2022/09/12 14:40:59         no
10.1.6-h6            459MB  2022/08/09 15:48:38         no

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

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

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

・実行結果

hogeuser@host1> request system software install version 10.2.0
Executing this command will install a new version of software. It will not take effect until system is restarted. Do you want to continue? (y or n)

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

hogeuser@host1>

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

・インストール途中の状態

hogeuser@host1> show jobs id 6

Enqueued              Dequeued           ID  ~~省略~~  Type   ~~省略~~   Status Result Completed
------------------------------------------------------------------------------------------------
2022/12/26 19:22:19   19:22:19            6      SWInstall                ACT   PEND        51%
Warnings:

Details:


hogeuser@host1>

・インストール後の状態

hogeuser@host1> show jobs id 6

Enqueued              Dequeued           ID  ~~省略~~  Type   ~~省略~~   Status Result Completed
------------------------------------------------------------------------------------------------
2022/12/26 19:22:19   19:22:19            6      SWInstall                FIN     OK 19:26:09
Warnings:

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




hogeuser@host1>
広告

5.再起動する

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

request restart system

・実行結果

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) (Mon Dec 26 19:27:38 2022):

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

C:\>

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

広告

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

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

hogeuser@host1> show system info

hostname: host1
ip-address: 10.0.0.5

 ~~~中略~~~

vm-license:
vm-cap-tier: T2-14GB
vm-cpu-count: 4
vm-memory: 14351728
vm-mode: Microsoft Azure
cloud-mode: cloud
sw-version: 10.2.0

 ~~~中略~~~

device-certificate-status: None

hogeuser@host1>

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

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

GUIでOSバージョンを変更する方法

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

【Paloalto】PAN‐OSバージョンをアップデートする方法
PAN‐OSバージョンをアップデートする方法を紹介します。今回は仮想アプライアンスとしてpalaoltoを利用しており、PAN-OSバージョンを「10.2.0」→「10.2.1」へと変更してみました。
広告

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

例えば、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」にバージョンアップをする必要があります。

コメント

タイトルとURLをコピーしました