HewlettPackard / python-ilorest-library

Python library for interacting with devices which support a Redfish Service
Apache License 2.0
181 stars 89 forks source link

Is there a way to get the console screenshot? #121

Closed sultanofswag closed 2 years ago

sultanofswag commented 2 years ago

Similar to Dell iDRAC?

rajeevkallur commented 2 years ago

You open console and click on camera icon to get console screenshot. iLO also has screenrecording feature as well with iLO Standalone client.

image

sultanofswag commented 2 years ago

Sorry. I meant "is there a way to get the console screenshot programmatically", so I can script it (linux) and run it through a image to text module to automate (or semi-automate) certain setup tasks.

I could do that for dell using the Redfish API scripts but cannot figure it out for HP iLO 5. We have a few hundred HP (DL 380 Gen 10) servers to setup with a custom OS. Being able to automate this will be very helpful.

Another part to this is being able to wake up the console if it times out and goes to sleep (if this prevents taking a console screenshot). Again, was able to do that for non-HP servers by sending a keystroke through a VNC server build into the remote management module (not very clean but there was no way to do it through the redfish api or other native mechanisms).

Thank you for the quick response.

rajeevkallur commented 2 years ago

@sultanofswag , Can you try a GET on the URL https://ILOIP/images/thumbnail.bmp and save the response to bmp or jpeg file?

image

kaviyajm commented 2 years ago

@sultanofswag can you please try this , curl --header "Accept: /" --header "Accept-Encoding: gzip, deflate, br" -u username:password --insecure --output thumbnail.bmp https://iloip/images/thumbnail.bmp

rajeevkallur commented 2 years ago

Above command should work fine. Please reopen if otherwise.