How to mount a PA-VM managed disk on a linux machine in Azure
10306
Created On 04/09/19 13:55 PM - Last Modified 04/10/19 09:51 AM
Objective
There is always a chance that you lose access to the PA-VM due to a controlled or uncontrolled event. Without access to logs, it is quite difficult to provide an RCA and steps forward to get access back.
On Azure, it is possible to take a copy of the PA-VM OS managed disk and mount it on a Linux machine. This way we can parse logs and retrieve the running-configuration file.
Procedure
Step1
Go To the PA_VM Disks section and select the OS disk
Step2
Click Create Snapshot and fill in all fields
Step3
Go to All Service > Disks and from there create a new manage disk. Choose Snapshot as Source Type and the snapshot you created on Step 2 as a source snapshot.
Step4
Go to the Linux machine and add the disk created on step 3.
Step5
ssh the Linux machine and mount the new disk.
root@Linux-machine:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 16G 0 disk
└─sdb1 8:17 0 16G 0 part /mnt
sr0 11:0 1 628K 0 rom
sdc 8:32 0 1023G 0 disk
├─sdc2 8:34 0 7G 0 part
├─sdc7 8:39 0 17.2M 0 part
├─sdc5 8:37 0 16G 0 part
├─sdc3 8:35 0 7G 0 part
├─sdc1 8:33 0 1003M 0 part
├─sdc8 8:40 0 21G 0 part
├─sdc6 8:38 0 8G 0 part
└─sdc4 8:36 0 1K 0 part
sda 8:0 0 30G 0 disk
└─sda1 8:1 0 30G 0 part /
root@Linux-machine:~/PAN# mkdir sdc1
root@Linux-machine:~/PAN# mount /dev/sdc1 sdc1
Log folders can be found under
root@Linux-machine:~/PAN/sdc2/var/log/pan# pwd
/home/admin_123/PAN/sdc2/var/log/pan
Running configuration file can be found under
root@Linux-machine:~/PAN/sdc5/mgmt/saved-configs# pwd
/home/admin_123/PAN/sdc5/mgmt/saved-configs