This article has been popular for many years right throughand it still works right up through vSphere 6. The latest info has been appended via detailed updates below. Worked great, for years. Power goes out, software triggers graceful shutdown. Data protected, safe. Also works. But what about a better way? Sounds interesting? Hey, look on the bright side, at least you have an article to read and a video to watch, while you wait. So, what's the other catch?
Well, here's what CyberPower support has to say. But hey, if it works, why would you need support? Remember, this is a home or lab we're talking about, so if that's acceptable risk for your application, read onward. It's just me sharing an affordable option, a particular combo of hardware and software that works well for my needs.
And during this long journey, I accidentally surfaced some bugs with their other versions of software. For example, PowerPanel Business Edition 2. All the other minor issues I discovered, I took the time to report, and may be fixed on a best-effort basis.
Remember, I don't have any official support either. For example, the web view of the appliance shows "0 Watts", but not a big deal, given the load percentage still shows, as pictured below. And remember, I can always check on the LCD on the front of the device, where watts can be displayed with a single button tap, seen here.
I began my yearning for an elegant, easy-to-set-up, robust, and automatic way to shutdown ESXi during power outages way back in the spring of Especially since poking around their site seemed to indicate some sort of VMware support.
And I quickly became fond of the easy to use, always available even if the PC is not LCD display, with the simple way to mute alarms, described and partially demonstrated here. And the UPSs batteries are replaceable. My efforts at ESXi shutdown have mostly been around failed tests of a variety of scripting techniques that I didn't particularly enjoy trying to get working, under a wide variety of OSs.
Lots of scripting prerequisites to install as well. Surprise gotchas like "doesn't work with free Hypervisor, because it relies on vCLI. Basically, I had stumbled over numerous barriers that I really felt weren't worth sharing, as they were so complex and problematic, that I knew the likelihood of folks actually doing this sort of thing for themselves was slim. There was also the very real potential price issues, given VMware compatibility of UPSs tends to be priced as an "enterprise" feature.
All I really wanted was something far simpler. Ideally easier than existing vCLI techniques that won't work with the free Hypervisordescribed here: www. So I'm very happy to have found a free way to do this that doesn't take long to implement. I used a fresh copy of ESXi 5. Retesting with the free Hypervisor license mode will be next, since I don't yet know anything about how this CyberPower solution is "talking" to the ESXi host.
But some tests so far with vMA have revealed some difficulties there, particularly surrounding firewall config for email alerting. So for now, I'm going with the simplest and perhaps most robust approach.
I may wind up just sticking with it, since it apparently seems to work so well.Government to procure products that were manufactured in the United States or other authorized countries. On-Line UPS systems use a double power conversion system to produce a pure sine wave output and zero transfer time to battery to provide the highest level of power protection.
Output Volt-Amps VA is a measurement of electrical power and is used to size a UPS system for the equipment that will be connected to it. Rack Height U Spaces is a measure of vertical space or the height of equipment mounted in a rack enclosure. The maximum depth of equipment that can be mounted in a floor-standing or wall-mount rack enclosure cabinet.
There are variations of the VESA pattern based on location, size and weight of the display. Active cooling uses energy to transfer or remove heat from one area and pass it onto another.
Passive cooling does not use energy to cool an area; rather, it employs natural cooling design guidelines, or the addition of thermal barriers, panels or insulation to prevent heat from entering an area.
Configure virtual machine shutdown on standalone VMware ESX and ESXi hosts protected by PowerChute.
Phase is used to describe the two main types of alternating current AC electric power produced by a utility, generator or UPS system. Single-phase power includes a single AC waveform, making single-phase equipment ideal for lower power density applications with per-rack power consumption levels up to approximately 2. Three-phase power includes 3 AC waveforms, making 3-phase equipment better suited for intermediate and high-capacity applications with per-rack power consumption levels that surpass the practical energy limits of single-phase equipment.
Joule Rating is the unit of energy, based upon the International System of Units, by which surge protectors are rated for their ability to absorb surge energy to protect connected equipment.
A higher number indicates greater protection and a longer life expectancy. Hinged Wall Bracket is a mounting device that attaches a wall-mounted rack to a wall. It has adjustable pivots that allow the rack to be locked into a closed or open degree perpendicular position. It minimizes cable flex and facilitates installation and ease of access.
GFCI Plug is a type of safety outlet that protects against a common type of electrical shock hazard, the ground fault. It contains a ground-fault circuit interrupter GFCI device, which quickly disconnects a connected device from the power source in the event of a ground fault.
Seismic Rack is a type of enclosure featuring a rugged welded construction that has been tested to Seismic Zone 4 standards. Seismic Racks provide additional security for locations situated in earthquake-prone areas or are subject to regular vibrations at locations such as airports or industrial environments. Pure Sine Wave Output is virtually identical to the smooth arc typically associated with a utility-produced sine waveform.
It allows equipment to run cooler, last longer and operate without malfunctions and reduced performance. It also ensures maximum compatibility with sensitive electronics.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
I am shipping a bunch of ESXi 5. We are generally using UPS without a network card e. Has anyone managed to do this. We tried this a number of times with USB and found no solution. Would also think SmartUPS would be a better choice and you can fit with network card.
Subscribe to RSS
Naturally more money but if your servers are at all important, that cost should be worth it. Also gives you more monitoring and alerting which might be useful at a remote site. You also need to assure sufficient runtime for all VMs to cleanly shutdown and then shutdown the host. A Linux virtual machine running on this ESXi host. The upsmon master process running on the same machine connects to the upsd and initiates the shutdown.
ESXi host is running the 2nd instance of upsmon which also connects to the same VM upsd via internal network. Of course there are more details, and it took some time for me to make this working as it should. But now it performs very nicely. The only important is to have this VM running ASAP after host boot, and shutdown it last so host down time is predictable - as said above, it is around 1 minute for me and 2 more minutes I reserve just in case.
Due to using the NUT you can power more devices from the same UPS if required, and all they can be shut down gracefully. Super question. It is actually possible to do this quite nicely - at least on some setups.
I have tried the following recipe on a number of ESXi 5. Basically, the solution goes like this:. Once you have these things running, the doshutdown scriptlet from step 8 gets invoked on a power failure. This is turn invokes the shutdown. Your slave apcupsd. This works with the Windows version of apcupsd available here as well. You can use the included apctray. You might consider using the USB device passthrough functionality to a guest running PowerChute or other software able to monitor the UPS's health and capable of triggering a shutdown on the ESXi host e.
If you're going to do that, then for most practical intent and purposes, you should probably just save yourself the money of a battery-backed UPS, and let the loss of power shut down your machine for you.
Granted, a clean shut down is always preferable to a power loss, but you seem to be missing out on the point of having a battery time of longer than a couple minutes if you automatically shut every thing down when you lose the power feed. The way I've always handled it is to have monitoring alert the SAs when the power goes down, so the SAs can use their grey-matter to decide when or even if to shut down the servers. If it's a brief outage, it may not be a good idea to shutdown the servers at all, or you may want to leave some servers up and running as long as possible, and only shut them down before the battery's about to die.
Really seems to me like a decision-making task better suited for a human than a simple rule. Using the simple serial signaling cable and their Red Hat-only binaryit was easy to setup rules to govern a locally-attached server. Basic email notifications for UPC battery events, line power events and shutdown actions were available:.
That software eventually went commercial or was buried on the APC website. There were a few open-source approaches to provide something similar.What I was trying to accomplish is for the UPS to signal power loss to the physical windows machine and then that physical initiate the shutdown on the 4 hosts.
I've installed PowerChute 9. Quite new to this UPS side of things so don't even know if what I'm trying to do is possible, so looking for some advice from this great community? Testing the script alone it works, but powerchute isn't executing it successfully. Probably just a simple permissions thing but I finished up for the day an hour ago so home time for me :. To continue this discussion, please ask a new question. Get answers from your peers along with millions of IT pros who visit Spiceworks.
Hi all, Having some trouble getting a UPS set up for automatic shutdown. Best Answer. Denis Kelley This person is a verified professional. Verify your account to enable IT peers to see that you are a professional. Spiceworks Help Desk. The help desk software for IT. Track users' IT needs, easily, and with only the features you need. Slaverty Feb 6, at UTC. This topic has been locked by an administrator and is no longer open for commenting.
Read these nextWhen power is restored it also handles the start-up of the virtual machines. Instead of adding a new VM just for this purpose, we decide to us a VM which was used as an multi-purpose Application Server.
This VM was hosting some of the applications used to deploy,monitor and manage some services like antivirus and WiFi access points. The below script has been compiled from postings by Alan Renouf and Patrick Tirlsten.
As someone mentioned in the comments section of his site, the timer keeps resetting when the countdown reaches the first 60 seconds.
I modified it slightly to fix this issue. For the shut down to function properly, you need to use an account which has administrator rights on the ESXi host.
I have created a new user on our host, named apcups. The password is stored in an encrypted file, upssecurestring. The script below has been saved as shutdownvms. The script will add the required PowerCLI snapin to the session.
Every 10 seconds, it will check how many VMs are still ON. Additional information is also provided for VM power state and VM shut down progress. Now that the applications have been installed and the script modified for our needs, we need to setup the Powerchute Agent to execute the shutdownvms.
There you should find a file named default. Edit the contents of the file and add the below. If you changed the location of the Script Folder or the name of the shutdownvms. The first time you login, you will need to complete the configuration wizard.
In the Shutdown Settings section make sure that the command file, you added the above line to, has been selected. It is important to allow enough time for the virtual machines to shut down in the time required to run the command file. That is the time the script will wait before shutting down the host.
When shutting down the host, the Powerchute virtual machine will be shut down. The Time for operating system to shut down should be set to allow enough time for the VM and the host to shutdown properly. Hi, Thanks for the feedback. Really appreciate it. You should be able to setup e-mail notifications when installing Powerchute Business Edition.
This should allow you receive e-mail notifications related to the ups power and health states. If I can access the system again I will try to confirm the above. I have a similar situation and I will be following your steps. Very happy you found it useful. I really appreciate you leaving a comment and letting me know Thank you. Hi, the windows and linux servers you refer to are they VMs or Physical Machines.
If they are VMs, you need to make sure that VMware tools are installed on them so that the process can perform a clean shutdown. If they are physical machines, you can install the PowerChute Business edition agent on the Physical machines and point it to the the VM where the PowerChute Business Server is installed. One remark: With ESXi 6. Hi, thanks for letting us know. I am pleased this post is still helping people out. Also, thank you for pointing out the new commandlet.
Hi Brian, and thanks for sharing your knowledge. I have a esxi 5.What's new New posts New resources Latest activity. Resources Latest reviews Search resources.
Smart UPS 2200 without Network Card, only USB. | UPS Management Devices & PowerChute Software
Thread starter silverback Start date Apr 18, Joined Jun 26, Messages I am running a new system on ESXI 6. I have not found a suitable solution for UPS shutdown for the sever itself. But would much prefer an alternative that would shutdown all the running VM's and then shutdown the server. Joined Aug 15, Messages I don't have access to my server now, but can get the proper syntax later.
You can test this with a cron job or a console window to ensure that you have the keys setup correctly.This is an updated guide including the Synology side as well.
Find the earlier guide here. Please note that an updated version of the library has been released. These are set in two different files as described below. The named server instance is defined in the file ups.
Port is set to by default auto. If the port is non-default, you will need to make the proper changes in the firewall on the ESXi side, however the defaults are automatically applied during installation. This file is updated whenever the fw is updated on the Synology which is something to keep in mind if you want to set your own.
The username and password are used on the ESXi side. The NUTClient vib package has been updated to version 1. The NUT client package contains configuration files, installation script, firewall settings in addition to the NUT client library.
Instead of entering the configuration using the UI, you can set them to default values using the install script as well. The settings are used to create configuration files on the ESXi host, when the service is started. The vib installation also creates firewall settings to allow the client outbound traffic on default and 25 ports.
You can change these ports in the firewall ruleset configuration file. The reboot forces the creation of the configuration files in addition to the variables being available in the advanced configuration.
Make sure the settings are set as you want as these are used to generate the configuration files. Will list the upsmon in the list of rulesets as enabled set to true. Change the settings in the upsmon. The default startup policy is manual so you should change the startup policy to start and stop with the host.
The Synology default is "monuser" UserVars. Synology configuration details The named server instance is defined in the file ups. Credentials This file is updated whenever the fw is updated on the Synology which is something to keep in mind if you want to set your own. Verify installation in ESXi UI Look in the Packages section of the UI Reboot the ESXi host The reboot forces the creation of the configuration files in addition to the variables being available in the advanced configuration Validate the advanced settings Make sure the settings are set as you want as these are used to generate the configuration files.