Real-time performance monitoring and troubleshooting
Post Reply
cr5150
Lurker
Posts: 2
Liked: never
Joined: Dec 02, 2010 8:17 pm
Full Name: CR
Contact:

Script to restart vmware tools service

Post by cr5150 » Feb 14, 2011 12:53 pm

Every monday morning I have a server that loses its heartbeat. By stopping and starting the vmware tools service, functionality is restored. I get notified currently via email when the heartbeat is lost. I'd like to automate the process of stopping and starting the vmware tools service on the server that generates the alarm. Is it as simple as creating a .bat file with "net stop" and "net start" and plugging that into the veeam monitor script portion of the alarm? Or is there more that I need to do?


I appreciate the help. Looking forward to resolving this so I dont have to restart services every monday morning at 1am!! :D

Vitaliy S.
Product Manager
Posts: 23015
Liked: 1561 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Script to restart vmware tools service

Post by Vitaliy S. » Feb 14, 2011 3:55 pm

I guess you need to use PsExec (from sysinternals pack) in order to trigger "net stop" and "net start" commands remotely from Veeam Monitor VM.

In addition, please note that if you want to restart VMware Tools solely for this VM, you should create/copy this alarm from a default set of alarms, create a post alarm action script and assign this alarm on the "problem" VM exclusively.

cr5150
Lurker
Posts: 2
Liked: never
Joined: Dec 02, 2010 8:17 pm
Full Name: CR
Contact:

Re: Script to restart vmware tools service

Post by cr5150 » Feb 14, 2011 7:54 pm

thanks. i setup this batch file:


cd\
cd c:\pstools
psexec \\tul-imaginera net stop "VMware Tools Service"
psexec \\tul-imaginera net start "VMware Tools Service"
exit


and created a custom rule and assigned it to just the \\tul-imaginera server. under actions i have it set to Run script, and the value is c:\pstools\vmtools.bat Think I did it right. I'll find out next Monday!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests