Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running PAN-OS-PHP on Panorama File (no API) #792

Open
enna440 opened this issue Nov 26, 2024 · 5 comments
Open

Running PAN-OS-PHP on Panorama File (no API) #792

enna440 opened this issue Nov 26, 2024 · 5 comments

Comments

@enna440
Copy link

enna440 commented Nov 26, 2024

I have my Pano config exported and added to PAN-OS-PHP so I see it when I do 'ls' however when I try to run commands it hangs at Reading XML file from disk for a long time then eventually pops up Killed. I am trying to delete unused objects.

image

I'm not sure what is wrong since I'm not getting any feedback since it just pauses for a long time then kills it.
Is there anything I can try for troubleshooting steps?
Is the file bad?
Am I typing the command wrong?

This is my first time doing anything like this but I want to learn how to use this tool properly.

@swaschkut
Copy link
Contributor

swaschkut commented Nov 26, 2024

as you should already know,
this repository of Palo Alto Networks is not longer maintained.
Based on the Version I see: pan-os-php 2.1.27 you are using:
https://github.com/swaschkut/pan-os-php

Nevertheless, your issue is based on your host system.
The Docker container does not have enough memory attached from the host.

An Example how to ingress the memory for your container is available by searching at Google:
https://forums.docker.com/t/how-to-increase-memory-size-that-is-available-for-a-docker-container/78483

@enna440
Copy link
Author

enna440 commented Nov 26, 2024

What is the recommended amount of memory?

@swaschkut
Copy link
Contributor

this depends on your Panorama configuration file.

I assume in your config file there are a lot of dynamic Addressgroups.

you can try to load your configuration file by adding the following argument:

 - shadow-loadreduce
     during config load do NOT load dynamic-addressgroup information from address objects TAG based part

pan-os-php type=device in=running-config.xml shadow-loadreduce

I used on some parts at least 4GB; for some big configuration files much more

@enna440
Copy link
Author

enna440 commented Nov 26, 2024

My pano config file is about 10MB.
Just increased the memory to 4G, it actually runs past the reading XML file part now.

Thank you for your help with this.
I'll try playing with the configs now.

@swaschkut
Copy link
Contributor

your are welcome.
as I can not close this ticket.
here a marker for myself.

------DONE--------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants