Johannes_de
Contributor
Contributor

Loading snapshots for a group of guests via script and alarms.

Hi,

 

i am relatively new to VMware and am trying to improve the workflow of my system. Let me explain my problem. I have related groups of guests. All snapshots of a group must be reloaded if a certain event occurs (e.g. Shutdown of a Guest). The event comes from a VM outside the groups. Currently this was done with a PowerCLI script and a CronJob.

My idea at the moment is to use the "alarm" function to capture the events i need and trigger a script. My question now is if the alarm can start the currently used PowerCLI script or do I need to use some automation SDKs (e.g. with Python) for this? If anyone has a better idea than mine I would appreciate any advice.

 

Thanks a lot and stay healthy

Johannes

0 Kudos
4 Replies
LucD
Leadership
Leadership

Where do you intend to run that triggered script?
Not on the VCSA I hope.
Are you using an SNMP manager somewhere in your environment?
Would it be able to run a script when it receives a specific Trap?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Johannes_de
Contributor
Contributor

Hi LucD,

thanks for the quick reply. We don't have SNMP Manger running at the moment and our admin don't want to use it. Yes I have thought about running the script on the VCSA, but if I understand you correctly this doesn't seem to be a good idea. 😕 What would be the problem with this method?

I don't think traps will help in my case. The triggers that are supposed to be used are when an RDP connection is deliberately closed or disconnected in any way. The example with the shutdown was just a workaround idea of mine since I didn't find any entry about disconnections in the alerts.

Thanks again and best regards
Johannes

0 Kudos
LucD
Leadership
Leadership

The VCSA, afaik, should be considered a black box.
Adding apps on there might void your support and can have an impact on the performance of the VCSA.
Not to mention that you potentially might compromise the security of the VCSA.

RDP sessions that are disconnected have nothing to do with vSphere.
This happens in the Guest OS running on a VM, but could just as well be happening inside a Guest OS on a physical box.
That also explains why there are no vSphere Alarms to capture this.

You would need a monitoring setup that looks inside the Guest OS. This could for example be based on the Eventlog in a Windows based Guest OS.

I'm afraid you are looking at the wrong platform to capture events happening on a completely different platform.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Johannes_de
Contributor
Contributor

Hey LucD,

we have decided to put the issue on hold for now. Thanks in any case for the help. From my side, the question can be closed.

Best reguards
Johannes

0 Kudos