How to use a CyberPower UPS solution for proper automated shutdown of your VMware ESXi lab during power outages, including all VMs

Posted by Paul Braren on Nov 27 2012 (updated on Aug 19 2016) in
  • ESXi
  • HomeServer
  • HowTo
  • Preparedness
  • Reviews
  • UPS
  • CyberPower-from-Amazon
    CyberPower PFCLCD Series available in 4 capacities at Amazon.

    Shutting down my old Windows Server v1 system was pretty simple, done by attaching the USB 2.0 signal cable from the UPS to the server, installing software, then attaching the UPS. Worked great, for years. Power goes out, software triggers graceful shutdown. Data protected, safe.

    Shutting down my new precious Windows Server 2012 Essentials VM is pretty simple too, done by attaching the USB 2.0 signal cable from the UPS to the server, installing software in the VM, then attaching the recognized CyberPower USB device to the VM. Also works.

    But what about a better way? A method that'd be able to handle VMs running under ESXi 5.1 (through 6.0), automatically. No need to install anything in each of the VMs, other than VMware Tools. No need to turn on SSH access to ESXi. Using an affordable CyberPower UPS (PFCLCD series go for as little as ~$118 USD), with user replaceable batteries, and a free VMware-ready software bundle.

    See also:

    Sounds interesting? Before reading the full story, you may want to kick off the 670MB download from here (if that fails, try this link, choosing the last item labeled VMWARE). Their site is bandwidth limited to 1Mbit/sec, which won't be fixed for a year or so I heard, so it'll take at least an hour. 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. CyberPower's PPBE (PowerPanel Business Edition) does not officially support the PFC series, but is known to work just fine with it. 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. And note that this story is not some sort of endorsement for CyberPower (versus APC , Tripp Lite, etc.). 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.3 has high CPU usage under vMA or Windows, which CyberPower already knows about and is fixing. 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 2011. I had done some research before buying my UPS, covered here, choosing a UPS that was compatible with my efficient vZilla PFC power supply, without any disturbing/worrisome buzzing power supply issues (during power outages).

    I had used a variety of APC and Tripp Lite products for decades, but wasn't as familiar with CyberPower UPSs. I had discovered that my older/cheaper APC  UPSs couldn't stay running with any generator brands I tried, clicking and turning off (read related story here), so I was especially open minded about giving CyberPower a shot. Especially since poking around their site seemed to indicate some sort of VMware support.

    CyberPower's various sizes of UPSs in their series of affordable, consumer line of products can be seen on Amazon and NewEgg. I chose the CyberPower CP1350PFCLCD PFC Compatible 1350VA 810W Pure Sine Wave Tower UPS at $169, with free shipping (Amazon Prime). 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. So I went and bought 2 more similar units, going with the same exact model for my home entertainment center, and a smaller CP850PFCLCD for my home office (pictured in my office here) at $112.92, more than adequate for my laptop, 3 monitors, and an Ooma VOIP device, mostly just to gracefully handle fairly frequent power blips. 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." Lots of dusting off my my limited VI editor / Linux skills.

    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 Hypervisor), described here:

    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.1 Hypervisor, for my ultimately successful configuration/demonstration below, using the 60 day trial period. 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.

    I may also eventually try to get UPS monitoring working within the vMA that I plan to use as a syslog capture appliance. 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. You may too, once you see it's not difficult to set up and test.

    What's the solution? Well, it's a pre-configured appliance (VM) based on CentOS, where the hard parts were already handled by CyberPower. No Linux experience necessary. At all.

    The piece-of-mind in having an unattended, automated, and simple way to know that your home/lab environment will protect itself in a power outage situation is wonderful. This sort of configuration will reduce your chances of data loss, or running into potential RAID caching/corruption issues. You'll be confident you can bring your servers back up after the power outage, without worry.

    So read the steps below. And note that I seem to have some issues with reliability of USB communications on some of my USB ports and not others, which feels more like a hardware problem, not sure yet. So the advice would be to remove the USB device from the VM configuration, move the cable to another USB port, then try again, should you also run into communications reliability issues.

    If you're still not quite convinced it's this easy, go ahead and check out the simple YouTube video seen below, where I demonstrate, recorded live, uncut (only one blank section removed), done with only one rehearsal.

    You may also wish to browse through CyberPower's documentation here.

    Note that CyberPower has excellent support staff, who already know about the lack of documentation for the appliance, and a weak description on the download site that doesn't use the word "appliance". I'm confident those minor shortcomings will be addressed.

    Here's the step-by-step instructions for download/configure/test:

    1) Download CyberPower PowerPanel Business Edition.
    Updated Dec 10 2015 - all of CyberPower's related downloads are now here, with the direct file download URL you want listed here:

    PowerPanel Business Edition shutdown software works with serial or USB connections with UPS. Supports VMWARE vSphere ESXi 4.1 and later. VMWARE vSphere ESXi requires VM: CPU's:1, Memory: 2G, Disk: 20G. Virtual Appliance OS: CentOS 6.2, Username/Password: admin/admin. PowerPanel® Software Username/Password: admin/admin

    Grabbing that 672MB zip file that's apparently coming from Europe (seen in full URL above) takes a full hour, to me here in North America, with an apparently 1Mbit/sec max speed.

    Updated Dec 10 2015 - It seems CyberPower has moved to Amazon S3 storage in the US West region, for faster downloads for most folks. For me, I'm now at about 20 minutes.

    2) Unzip the download you will find it unzips another zip file, extract that one as well

    3) Import the VM use vSphere Client's  File, "Deploy OVF Template..." menu navigate to the OVF file extracted in step 2 above


    4) Configure the VM's settings turn on VMware Tools Time sync assuming you've attached your CyberPower UPS to the ESXi 5.1 host, attach the CyberPower USB device to the VM

    5) Power up the VM


    6) Point your browser to the VM's IP address login as admin/admin

    7) Configure shutdown of ESXi 5.1 on the Event Action, Settings (probably works fine for ESXi 5.0 as well):


    8) Configure Event Action, Events be sure "Utility power failure" column marked "Shutdown Initiated" is set, I chose 30 seconds:


    You may also wish to configure automatic shutdown and startup settings of your most valuable VMs, including this CyberPower Appliance VM you just created, described here by VMware.

    Finally, for more details, catch the complete walk-through video below, which includes VM download, deployment, configuration, and shutdown test procedures. The actual section where I cover the install and configuration of the appliance, followed by web configuration of shutdown, is only about about 15 minutes:

    Jul 02 2013 Update

    Special thanks to site visitor Brian, who left this comment alerting me that 2.3.2 is now out, downloaded from the 4th/last link listed here, or the direct URL from here (which is still very slow from EU to NA, taking over an hour): Brian apparently had an issue with an older version of the appliance that I did not experience, looking forward to hearing how that turns out for Brian. I'll also be testing 2.3.2 out myself, of course. Stay tuned!

    Jan 18 2014 Update

    These same instructions have been confirmed to work fine with ESXi 5.5, and the newer CyberPower PPBE 2.3.3 appliance, downloaded from here. Download links in above article now updates. There is no need to re-record video and screenshots, since the only difference I noticed is that I can now see the watts being used in realtime (they used to always falsely show 0%). See also visitor comments and screenshots below, as well as the closely related article,

    Feb 22 2014 Update

    PowerPanel Business Edition Agent Virtual Appliance 2.4 (ESXi, ESX) is now out, see release notes here. I haven't bothered to test it, not seeing anything significant enough in the release notes to warrant re-testing everything out, I'm pretty happy with 2.3.3 as it is.

    Apr 04 2015 Update

    From site visitor comment below, we now have confirmation that one of the last builds that allows USB support is 2.6.1, downloaded from CyberPower here:

    Aug 28 2015 Update

    New release!
    PowerPanel Business Edition Agent Virtual Appliance 2.9 (ESXi, ESX)
    Testing it today, sure was easy to download and install. At last, AWS (Amazon Web Services) S3 is used for the download server, no more of those very slow downloads from EU to US, nice! Over an hour to download before became 2.5 minutes now. Here's the direct download link:

    2.9 works with ESXi 6.0.0b just fine
    So far, testing going well!
    2.9 works with ESXi 6.0.0b just fine here's status

    Dec 14 2015 Update

    New release!

    PowerPanel Business Edition Agent Virtual Appliance 3.0 (ESXi, ESX)
    AWS (Amazon Web Services) S3 is still used for the download server, no more of those very slow downloads from EU to US, nice! Still took me about half an hour though, so it seems some sort of server-side throttling has been activated since 2.9. Here's the direct download link:

    There's a report of some rather quirky behavior with 3.0, see the fantastically detailed comments by Georges Zwingelstein in the open disqussion below. I haven't yet had the chance to fully test this version out yet, but it would seem you might want to use a different version for now.

    Jan 22 2016 Update

    New release! I have not tested 3.1.1 yet.

    Pick whichever is faster, which is typically closer.

    From AU (

    From EU (

    Jan 28 2016 Update

    I've had multiple people contact me, including Anthony Capone below, telling me that the issues with 3.0 seem to have been fixed in 3.1.1, this is great news!

    Mar 24 2016 Update

    TinkerTry visitor Steve Lowe has kindly provided us with some free code to get your PPBE working well with your RHEL6 (Red Hat Enterprise Linux 6), as seen in the discussion below.

    These scripts are not applicable and not needed for the pre-configured VMware appliance.

    Specifically, these scripts are applicable to PowerPanel Business Edition users. At that download site, you'll find the particular download that these scripts are intended for:

    PowerPanel® Business Edition 3.1.2 (for 64 bits x86 of most Linux builds, VMWARE vSphere ESXi 4.1/5), PowerPanel® Business Edition software provide graceful shutdown service for UPS and PDU. Connects UPS with serial or USB connections and network. Download
    Size: 157,638,656 bytes, MD5:6e6d1f9058f7adb46b191d0f6002146c

    But before considering using these, read Steve's clarifications:

    Found a little quirk with ppbe on RHEL6, it does not like the usb port going to sleep. This was a real bear to track down. Also SMTP ports were being blocked by the RHEL firewall

    Here is the code, you will have to remove the iptables entries that CP creates and then run my add code. I am still waiting for CP to get back to me about the last UDP port that they are using.

    To remove the entries that CP creates list the firewall entries with iptables-save, then use the delete option (-D) for iptables and then save it.

    I fixed the add script so that it will check for CP’s entries and remove them and then add the new entries. The main difference between what CP is doing and what I am is that I am allowing ESTABLISHED connections.

    RHEL6 scripts for CyberPower owners using RHEL6, by Steve Lowe

    For CyberPower PFCLCD owners using the PPBE RPMs for power status via USB.

    I have not personally tested these scripts, they are provided on an as-is basis, with no assumption of support implied or given. The responsibility to protect your data is completely yours.

    # remove firewall entries
    declare -a ppbe_fw
    for i in "${ppbe_fw[@]}"
      INOUT=`echo ${i} | awk -F: '{print $1}'`
      PORT=`echo ${i} | awk -F: '{print $2}'`
      PROTO=`echo ${i} | awk -F: '{print $3}'`
      if [ `command -v iptables` ] ; then
        if [ "`iptables-save | grep ${INOUT} | grep ${PORT} | grep ${PROTO} | grep ESTABLISHED`" ] ; then
    #       echo "iptables -D ${INOUT} -p ${PROTO} -m state --state NEW,ESTABLISHED --dport ${PORT} -j ACCEPT && DELETE=1"
          iptables -D ${INOUT} -p ${PROTO} -m state --state NEW,ESTABLISHED --dport ${PORT} -j ACCEPT && DELETE=1
          iptables -D ${INOUT} -p ${PROTO} -m state --state NEW --dport ${PORT} -j ACCEPT && DELETE=1
    service iptables save
    service iptables restart

    # add firewall entries
    declare -a ppbe_fw
    for i in "${ppbe_fw[@]}"
      INOUT=`echo ${i} | awk -F: '{print $1}'`
      PORT=`echo ${i} | awk -F: '{print $2}'`
      PROTO=`echo ${i} | awk -F: '{print $3}'`
      if [ `command -v iptables` ] ; then
        if [ "`iptables-save | grep ${INOUT} | grep ${PROTO} | grep ${PORT} | grep -i ESTABLISHED`" ] ; then
          iptables -D ${INOUT} -p ${PROTO} -m ${PROTO} --dport ${PORT} -j ACCEPT && DELETE=1
        if [ ! "`iptables-save | grep ${INOUT} | grep ${PORT} | grep ${PROTO}`" ] ; then
    #       echo "iptables -I ${INOUT} -p ${PROTO} -m state --state NEW,ESTABLISHED -m ${PROTO} --dport ${PORT} -j ACCEPT"
          iptables -I ${INOUT} -p ${PROTO} -m state --state NEW,ESTABLISHED -m ${PROTO} --dport ${PORT} -j ACCEPT
    service iptables save
    service iptables restart 

    Jun 12 2016 Update

    TinkerTry visitor Steve Lowe has an update, some more scripts to help you get your PPBE working well with your RHEL6 (Red Hat Enterprise Linux 6), as seen in this discussion.

    if [ -f /root/ppbed_old_port.lst ] ; then
    OLD_PORT=`cat /root/ppbe_old_port.lst`
    USB_LIST=`lsusb | grep 0501 | cut -d' ' -f4`
    CURR_PORT=`echo ${USB_LIST} | awk -F: {'print $1'}`
    if [ ${OLD_PORT} != ${CURR_PORT} ] ; then
    echo `date +"%c"` >> duh.ppbed
    service ppbed restart >> duh.ppbed
    echo ${CURR_PORT} > /root/ppbe_old_port.lst

    Aug 19 2016 Update

    The place you download the appliance has been relocated:

    There are other connection types detailed in the

    The direct download for the appliance:

    • PowerPanel Business | Virtual Appliance | Agent
    • Shutdown software supports VMWARE vSphere, ESXi 4.1 and later
    • Download 487 MB

    See also at TinkerTry

    Excellent comment/comparison with similar APC's solution can be found in the discussion below, including this comment, thank you "analog"!

    See also

    APC configuration described in this

    More related articles that I had reviewed over the past year, so many different approaches: