View Only
Expand all | Collapse all

ESXi 6U1 APC UPS connect?

  • 1.  ESXi 6U1 APC UPS connect?

    Posted May 10, 2016 07:21 PM

    I have a small VM environment that consists of one ESXi 6.0 U1 host that's running on a Dell PE T320. Only two active VMs. One is the domain controller and the other is the IIS server. I have an APC Smart UPS1000XL that everything is plugged into for power but the USB cable is currently not going into anything. What would I need to install or setup that would allow me to plug the USB cable from the APC unit directly into the ESXi host so that I can configure it to shutdown everything gracefully in case of a power outage.

  • 2.  RE: ESXi 6U1 APC UPS connect?

    Posted May 11, 2016 07:49 AM

    Don't think this has been supported, migth be nowadays. I tried it once, to map USB to a virtual machine where UPS software runs but was advised not to do it that way, don't really remember why but it wasn't reliable for some reason.

  • 3.  RE: ESXi 6U1 APC UPS connect?

    Posted May 11, 2016 01:25 PM

    ESXi as self doesn't support UPS in any form (net/USB...)

    There are 2 options how to do this:

    • Your APC must have SmartSlot and you need to grab Network Mgmt Card then you can:

      • Use Network Shutdown from Schneider (APC) and deploy the appliance - preinstalled you only need to configure the basic parameters
      • Deploy Network Shutdown into vMA Appliance

    • If your UPS doesn't have SmartSlot or you cannot buy the card because the budget is over you need to do these things
      •     Install OS or  use existing Windows VM (you can also install Linux machine and configure APC daemon) to do same things
      •     Use  Schneider Electrics PowerChute inside the VM 


        generic (configurable in Power Options Control Panel - will need to Google little bit and  user some VBS script or something else  to monitor UPS though WMI interface because the UPS is presented to system as battery and there is no option to execute program)

        to get notified that UPS is shutting down

      •     Pass-thru the USB into the machine
      •     Make a script to inform ESXi from this VM that UPS is empty (tell them to shutdown), maybe SSH or through API or PowerCLI

          • When UPS will get depleted the VM must execute this script
          • Rememeber you must count with more time so start shutting the infrastructure at higher percentage of battery -  because it will need to hold the ESXi until it shuts down.
          • Have in all VMs VMware Tools installed and on the ESXi in VM Startup/Shutdown the options enabled and Guest Shutdown  set as shutdown option)


    The easiest way is to use UPS with management card, better to plan it at design time.

    I never have a need to use the USB passthrough in this way, but i think it can work.

    !!! Remember: For Network Shutdown you will need to have paid version (at least Essentials) to have read/write access to APIs !!!

    as stated here:

  • 4.  RE: ESXi 6U1 APC UPS connect?

    Posted May 11, 2016 01:32 PM

    Thanks for the details, I appreciate it. I am going to check that out next week when I am on site again. They don't have the SmartSlot so looks like I'll need to test with USB pass through. At least If I can get it communication with my windows server I can get email alerts at the very least.

  • 5.  RE: ESXi 6U1 APC UPS connect?

    Posted May 11, 2016 01:46 PM

    When you will get USB into VM then you can install PowerChute and set it to start command at shutting down then the only you need is

    SSH enabled on the host

    Automatic Startup/shutdown of VMs enabled

    execute plink.exe (part of Putty)  -> for  SSH to host and issue "shutdown" command.

    It's not systematic resolution but will work.

  • 6.  RE: ESXi 6U1 APC UPS connect?

    Posted May 11, 2016 01:48 PM

    Will that plink.exe command gracefully shutdown the other VM or will it simply powerdown the host?

  • 7.  RE: ESXi 6U1 APC UPS connect?

    Posted May 11, 2016 01:49 PM

    plink is part of Putty it only allows you to SSH to host from command line and execute command

    shutdown is an alias to internal ESXi script which will trigger more actions but the first is to initalize Automatic shutdown of VMs which have Autostart configured (remember to set Guest Shutdown as an action otherwise the VM will be HARD powered off)

  • 8.  RE: ESXi 6U1 APC UPS connect?

    Posted May 11, 2016 01:52 PM

    Ah ok that wouldn't work then as I have a Domain Controller and and IIS server on there so whichever I connect the UPS to via USB (it will be the DC) the other VM will still be in a powered on state on shutdown which I don't want.

  • 9.  RE: ESXi 6U1 APC UPS connect?

    Posted May 11, 2016 01:59 PM

    with plink you will only ssh to ESXi host

    when you issue "shutdown" command to ESXi then ALL the VM on that host which have autostart/shutdown in ESXi configuration enabled will be shut down and gracefully (Guest Shutdown action in settings) :smileywink:

  • 10.  RE: ESXi 6U1 APC UPS connect?

    Posted May 16, 2016 02:43 PM


    Windows VM with PowerChute Business ed. UPS mapped into VM (VM had USB controller and UPS USB device mapped into it)

    PowerChute configured to execute script

    fox example:

    plink -ssh -batch root@  -pw "password goes here" "/sbin/ && /sbin/poweroff"

    (plink.exe is a part of Putty)

    works like a charm.

  • 11.  RE: ESXi 6U1 APC UPS connect?

    Posted May 17, 2016 08:10 PM

    Thanks again for the help. I plan on putting this into place int ht upcoming weeks. My USB cable won't reach the ESXI host so I'm going to order one then I'll set this up