How to tell my server to shutdown when on ups power

ChRoNo16

[H]ard|Gawd
Joined
Feb 3, 2011
Messages
1,577
Tripplite sucks, most companies offer a pre-made VM i can deploy but they apparently dont.

How do I tell my VM server to shutdown when the power fails? Tripplite gives a serial and a usb connection, was hoping to use serial for VM server as usb will be set to my synology nas to tell it to shut down
 
Doesn't your ups soft support network communication? It should and using one installation connected to the physical UPS can control many others on the network. You just install the software on any OS you want to react on UPS events.
 
It's one approach.
But depending on the kind of VM I used to use another approach. In UPS software I could run a script/executable after a while when the power went off or just before shutdown. Using VMWare, I can shutdown (or other things) a VM in this script from the host using vmrun.exe tool. VMWare Tools should be installed in the VM.
But I left this (and any) approach out after I realized that when the software shuts down the host, virtual machines are put in hibernation by vmware which works fine for me. Not so if I manually shutdown so I shutdown my VMs before I shut down the host manually.
 
So what's the problem?
Install UPS software on every VM and do network shutdown. Is this hosted VM or something ESXi..
 
ESXi, and I cant seem to share the USB connection to all the vm's just one at a time, so only one VM see's and communicates with the UPS
 
ESXi, and I cant seem to share the USB connection to all the vm's just one at a time, so only one VM see's and communicates with the UPS
Part of the tripplite software is a network managed shutdown software, one of the VMs gets the main control suite, the rest communicate to the control suite vm via control agents and SNMP.

https://www.tripplite.com/products/power-alert-network-shutdown-agent

Not sure if that will work for the USB connection or if its only for the networked models.
 
Since it's not network-attached (yuck), if you can pass the USB device into a Ubuntu VM you'd probably have better luck with that... as Ubuntu likely has a generic driver that can interface with it you could setup a bash script on a cron job to monitor the UPS. I wouldn't think it'd be terribly hard.
 
.. and if installing the software on all OSes is undesirable for some reason, you could set up something like that - the UPS soft could maintain a text file with some data and all other VMs (or machines) can "ping" it and read it every few seconds to take decisions on events and react accordingly.
 
Back
Top