zeeshansofi
Contributor
Contributor

Script to check Services

Hi,

Is there any way of writing a script to check the status of the services running inside the windows VM and shutdown the ESX server?

Thanks

0 Kudos
3 Replies
rriva
Expert
Expert

I don't understand exactly what you want to do, but with a simple batch file, and plink you can do something like this

if (look at the service name and the process) is running

than exit

else plink root@esx:shutdown

Bye

R

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanx!

RRiva | http://about.me/riccardoriva | http://www.riccardoriva.com
0 Kudos
zeeshansofi
Contributor
Contributor

I want to do SQL 2005 failover using script in VMware, I want to check the SQL services running inside the VM, so that I can take the following steps using the script,

- Shutdown the VM and start another VM with same configuration, and

- Configure HA and shutdown the ESX Server.

So that I can have both ESX and Application HA.

Thanks.

0 Kudos
rriva
Expert
Expert

Maybe Iìm wrong or I'm not understanding correctly what you want to do,

but I can understand why you want to shutdown ESX in case a SQL Service is not running on one VM ?

It will not more simple to try to restart the SQL Service on that VM and in case the restart not work correctly, shutdown or reboot that VM or otherwise power up another VM ?

Do you know software like NEVERFAIL ?

Bye

R

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanx!

RRiva | http://about.me/riccardoriva | http://www.riccardoriva.com
0 Kudos