Solved

ESXI UPS Connection

Posted on 2011-02-23
5
1,061 Views
Last Modified: 2012-06-27
I need to know what is the best waty to protect an ESXI server from power failure and of course the running virtual servers. With no USB support for usb connected UPs's (or presumably serial support) how can the esxi server do anything in the event of a power failure except crash along with all the virtual servers.
0
Comment
Question by:duncaninnz
5 Comments
 
LVL 6

Accepted Solution

by:
siht earned 500 total points
ID: 34967978
The general way to do this is to have your UPS connected to UPS management software in a Windows or Linux host. Then when you have a Power Out event the UPS management software fires a script which shuts down your ESXi host(s). If your VMs are configured to shutdown/suspend when the host shuts down they will do so.

The trick is how to connect your UPS to the UPS management software. If you have a 'traditional' physical host then no problem, attach your UPS USB cable to that and away you go. If you're all virtual then it's a little more complex. You can use a network management card on the UPS to communicate with the management software. I can confirm that the USB passthrough feature introduced in vSphere 4.1 will connect a Server 2008 VM to an APC UPS over USB. Another method is to use a USB over IP device to connect your UPS via USB to a VM.

This script works well to gracefully shut down an ESXi host:

http://blog.peacon.co.uk/wiki/Esxi-control.pl#Host_Shutdown

Here are a couple of other resources I used to get this working in our environment:

http://www.techhead.co.uk/how-to-automatically-shut-down-vmware-esxi-gracefully-during-power-failure-using-an-apc-ups

http://communities.vmware.com/docs/DOC-9531

Good Luck
0
 
LVL 6

Expert Comment

by:siht
ID: 34967998
0
 
LVL 118
ID: 34968497
You must have the licensed version of ESXi (not the free licensed version). Because the CLI and API are read only in the free licensed version.

I've discussed this many times on EE, have a look at my solutons here which discussed APC UPS and ESXi.

http://www.experts-exchange.com/Software/VMWare/Q_26680279.html

http://www.experts-exchange.com/Hardware/Components/Power_Supplies/Q_26573834.html

http://www.experts-exchange.com/Software/VMWare/Q_26808288.html

http://www.experts-exchange.com/Software/VMWare/Q_26646419.html
0
 
LVL 4

Expert Comment

by:jmdion
ID: 34989382
Is it for a non-production environment (lab/personal/home) and you are using the free version of ESXi?

If this is the case I have a low cost solution (free if you already have a UPS with a USB port).  I use the free PowerAlert from TrippLite (works with all brands of UPS) and a few lines of PowerShell.

The solution shuts down the running servers (guests/VMs).  It's an all Windows environment.

When this is done the ESXi host has its power simply cut off by the UPS.  This does not damage the ESXi installation: you may lose recent changes you made in the configuration.  Link to my own question about this: http://www.experts-exchange.com/Software/VMWare/Q_26678696.html

Last month there was a real power outage and everything worked as it should.  Of course nothing will power on automatically when the power comes back like in an enterprise scenario.
0
 

Author Comment

by:duncaninnz
ID: 34990488
No its production
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we have a dead host and we lose all connections to the ESXi, and we need to find a way to move all VMs from that dead ESXi host.
HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and exp…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now