Hi Guys.
I wonder if anyone could assist me.
We are having many power outages here in South Africa and I am faced with having to shut down our servers regularly.
I have got all our windows servers shutting down automatically via our UPS software (Riellio)
I have tried to download the Vmware software from our UPS support page but they say it wont work on the free version of Esx 5.1.
In turn what I have done is to create a script which runs through Plink and I am hoping to use this on another windows box as a shuhtdown script.
So when the windows box shuts down it will run the script and in turn shut down the ESX i host.
I have enabled the SSH server on the Esxi and when I run the shutdown script it shuts down the server just fine but I have been reading that the server should be in Maintenance mode when powering off.
I just want to make sure it is shutting down the Esx server gracefully.
The script is below:
Any help would be appreciated.
Script text as follows:
plink -ssh root@10.1.6.11 -pw mypassword poweroff -d 10
plink -ssh root@10.1.6.11 -pw mypassword poweroff -d 10
Hi there,
while investigating the option of doing it via appliance, you can tweak your command to do the following:
plink -ssh root@10.1.6.11 -pw mypassword "esxcli system maintenanceMode set -e true;poweroff -d 10"
this way the host will first enter maintenance mode and the next command via ; will be shutdown.
Why do not you try "NUT" (network ups tools) software? It has client for ESXi too, and it supports many Riello-UPS models...
In my configuration, I have one linux-VM running as "NUT-master" (talking to ups). If power-outage is detected and battery is in "cirtical/low" state, it issues command to all "NUT-slaves" (other VMs, ESXi and other physical servers) to shut down. It works very well for me, and I think is more secure (does not need root-password for some script)...
Hi,
Thanks for the reply.
Does this come in the form of an OVF template which you need to install then on the ESX through VM ware Sphere. ?
Just trying to understand how it work.
If so I will check it out.
Thanks.
Hi there,
while investigating the option of doing it via appliance, you can tweak your command to do the following:
plink -ssh root@10.1.6.11 -pw mypassword "esxcli system maintenanceMode set -e true;poweroff -d 10"
this way the host will first enter maintenance mode and the next command via ; will be shutdown.
Hi Alistar...
Perfect...
Just what I am looking for in the meantime while I get the proper UPS option figured out ![]()
Much appreciated..
Shaun
NUT comes as any other installation file: source-code in "tar.gz" archive-file, "vib" as binnary installation package for ESXi, and there are also native binary formats for any common linux/bsd/windows. No special template is needed, it can be installed on any VM.
