Script to restart vmware tools service

Real-time performance monitoring and troubleshooting

Script to restart vmware tools service

Veeam Logoby cr5150 » Mon 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
cr5150
Lurker
 
Posts: 2
Liked: never
Joined: Thu Dec 02, 2010 8:17 pm
Full Name: CR

Re: Script to restart vmware tools service

Veeam Logoby Vitaliy S. » Mon 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.
Vitaliy S.
Veeam Software
 
Posts: 19564
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Script to restart vmware tools service

Veeam Logoby cr5150 » Mon 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!
cr5150
Lurker
 
Posts: 2
Liked: never
Joined: Thu Dec 02, 2010 8:17 pm
Full Name: CR


Return to Monitoring



Who is online

Users browsing this forum: No registered users and 4 guests