VMware Cloud Community
DINUS1979
Enthusiast
Enthusiast

Graceful Shutdown VCenter and VSAN with UPS Riello

Hi everyone, I've been trying for weeks in my infrastructure to automate the shutdown of the whole ESXi structure (Vcenter-VSan-Host-VMachine etc etc ..)
I made a script using Powercli and did some tests run the script by hand and everything works perfectly until the final shutdown of the esxi hosts.
The problem comes when I want to integrate this script with ups.
My test is that when the power goes out the ups software starts the script.
This doesn't work DOES NOT start anything.
So I downloaded vSphere Management Assistant (vMA) a virtual machine which is supposed to do this job ie start scripts.
When configuring this virtual machine I get the following error:
vifp add server error ssl exception unexpected eof

Doing a Google search I found that vMAs are now deprecated ....

What do you recommend?
Thanks to those who will help me

Reply
0 Kudos
8 Replies
vXav
Expert
Expert

Have you checked that the user used by the UPS software to start the script has the correct permissions on vCenter?

Reply
0 Kudos
DINUS1979
Enthusiast
Enthusiast

it's not an ups problem, in fact the software is Powershield, I'm talking about the vMA
I can't add esx hosts

Reply
0 Kudos
vXav
Expert
Expert

I was talking about your original idea. I'm not familiar with Powershield but what I mean is to check the user under which it runs. For instance if it runs as SYSTEM and starts the powershell script it won't be able to connect to vCenter. Same idea as a scheduled task, it has to run as a domain account that has permissions on vCenter.

Reply
0 Kudos
DINUS1979
Enthusiast
Enthusiast

I understand what you are saying and you are right, but I don't think that's it.
Powershield software uses batch files and I have a ps1

Reply
0 Kudos
vXav
Expert
Expert

Well then the user under which the batch file runs then as it's likely the one that start Powershell uses I suppose :). You could add "whoami > c:\user.txt" somewhere in the script to find the user being used.

It works manually but does nothing when Powershield starts it which is why I'm wondering if it's even connecting to vCenter. But fair enough I won't insist down that path as you seem confident it's not it.

You could always check this terrible and outdated doc (Set-ExecutionPolicy RemoteSigned).

Reply
0 Kudos
DINUS1979
Enthusiast
Enthusiast

ok guys,

I solved the problem, in the end it was just to understand how the upsmon software works.
Excuse me for wasting your time.
Thank you

Tags (1)
vXav
Expert
Expert

No problem at all.

Feel free to share what fixed it for you, it could always be useful to someone 🙂

philipvazquez
Contributor
Contributor

How you solve the problem, i face the same issue and not giving me to add the machine

Reply
0 Kudos