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.
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.
ESXi as self doesn't support UPS in any form (net/USB...)
There are 2 options how to do this:
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
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:
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.
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.
Will that plink.exe command gracefully shutdown the other VM or will it simply powerdown the host?
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 shutdown.sh 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)
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.
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)
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
plink -ssh -batch firstname.lastname@example.org -pw "password goes here" "/sbin/shutdown.sh && /sbin/poweroff"
(plink.exe is a part of Putty)
works like a charm.
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