Link to home
Start Free TrialLog in
Avatar of Rammy Charles
Rammy CharlesFlag for United States of America

asked on

Monitor vmware windows vm status of services

How can we use the vmware cli to monitor and report on the status of services inside a windows vm?

Like to be able to check to make sure vmware tools loads at the windows level and report the result on if it is started or not.
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Just VMware Tools service status or other Services ?
Avatar of Rammy Charles

ASKER

the vmware tools service to start. think it would be easier becuase that is a windows service that also ties into vmware and at the hypervisor level.
do you have issues with VMware Tools not starting?

you do know, you can check the status using the vSphere Client GUI ?

You can use the scripts here

http://blogs.vmware.com/PowerCLI/2011/11/vm-tools-and-virtual-hardware-versions.html
nope this is to pipe it into a script that can run an automated restart of windows guest vms and monitor the vmware tools status to see if the vm comes back online properly. is there a better way to do this?
VMware Tools does not effect the running of the VM.

If VMware Tools is not running or starting you have an issue.

Why not just set the restart count in Windows ?
Can you speak more about the restart count and how that can be used for this?
In the Windows OS, in Services, select the VMware Tools service, if you select the RECOVERY option, you have got options For First, Second and Subsequent failures, and what to to, e.g. Restart the Service, and restart count, and restart service after so many minutes.

see here

User generated image
So the OS has a function to restart services in the Guest VM, there is no requirement, to write scripts, or re-invent the wheel to do this.

If you have a service which is failing, it requires further investigation.
Ok so not looking to set the recovery option bc that is already setup. Looking to monitor the service so that we can trigger actions based on that service being started or stopped like an email notification.
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial