Hi all,
this is my first post so please don't hurt me ;-). and thanks for your patience
Our System-Environment:
- we have a rielloUPS with netman (ethernet) running and a small ESXi System with two ESXi-Host.
- VMWare ESXi 5.1.0-799733
- vMA Version 5.1.0.1-1062361
- Riello PowerShield 5.3.0 for vMA kernel 2.6-x86_64 + ups_shut.scr + ghettohostshutdown5.pl from Riello UPS GmbH - VMware ESXi 5
we have done every step in the supplied installation pdf-manual.
It seems that someone at Riello has already done some porting work at the Original Script from William Lam, but we cannot get it to run
first of all /etc/init.d/upsmon:
- the script uses ". /etc/rc.d/init.d/functions" we changed to ". /etc/rc.status
- the script uses "daemon $upsagent" for starting (we changed it to "start_daemon -u vi-admin -p $pidfile $upsagent"
with these changes we were able to start the daemon.
after installing the rpm, and some additional chmod +x changes to ups_shut.scr and ghettohostshutdown5.pl
the scripts will be executed by the daemon when the UPS goes on battery.
BUT SADLY:
the ghettohostshutdown5.pl is not able to login to our esxi hosts (esxi01 and esxi02) vma-host is "esxi01"
<SNIP>
06-11-2013 19:35:08 -- info: Host is "VmaTarget=HASH(0x1a99318)"
06-11-2013 19:35:08 -- info: Hostname is "esxi02"
06-11-2013 19:35:08 -- info: Found host: "esxi02"
06-11-2013 19:35:08 -- debug: Main: Login by vi-fastpass to: esxi02
06-11-2013 19:35:08 -- info: Error: Unable to login to host: "esxi02"! Ensure host is being managed by vMA!
</SNIP>
INTERESTING:
When i run the script MANUALLY as vi-admin with identical parameters from log:
<SNIP>
06-12-2013 01:07:18 -- info: Host is "VmaTarget=HASH(0x7be0f8)"
06-12-2013 01:07:18 -- info: Hostname is "esxi02"
06-12-2013 01:07:18 -- info: Found host: "esxi02"
06-12-2013 01:07:18 -- debug: Main: Login by vi-fastpass to: esxi02
06-12-2013 01:07:22 -- info: Begin auto operation on VMs ...
06-12-2013 01:07:23 -- info: Execute autoShutdownVMs()
06-12-2013 01:07:23 -- info: Issuing AutoStartPowerOff() ...
Can't use an undefined value as an ARRAY reference at /home/vi-admin/ghettoHostShutdown5.pl line 443.
</SNIP>
where is the difference when calling/execute the ghettohostshutdown5.pl:
- manually
and
- and by daemon, as "vi-admin" user
Thanks in advance