Solution needed: How to connect a APC UPS to vCenter for a automated shutdown

DeathmageDeathmage Banned Posts: 2,496
Hey guys,

So I know many of you have used Equalogic's and Dell servers but have you ever run into a need to have an automated shutdown that turns off VM's and then vCenter and then the hosts and then lastly the SAN in the event of a building wide storm related power outage? - I've been able to jerry-rigged a Dell Optiplex 7010 desktop with the Powerchute Business Edition on it to send an email once the power goes on backup battery so I get an email alert and god willing the neighborhood cable node still has power I can remotely shutdown systems in my 95 minute backup battery window.

But this is all manual....


I called up VMware and Dell - they both don't make a APC plugin that they know of, however said it was a good idea, and nor does Dell have a plugin to connect the Equalogic to the vCenter so I could initiate a soft shutdown.


Any of you guys ever find a solution to automated the process?

Comments

  • dave330idave330i Member Posts: 2,091 ■■■■■■■■■■
    You could probably script something with powercli or create a vCO workflow.
    2018 Certification Goals: Maybe VMware Sales Cert
    "Simplify, then add lightness" -Colin Chapman
  • joelsfoodjoelsfood Member Posts: 1,027 ■■■■■■□□□□
    You just asked the wrong people. :) APC has a solution for it, as it's their product doing the work, not VMWares.

    PowerChute Network Shutdown

    I've not used it on 5/6, but works well on 4.1

    Here's the doc for VMware setup

    http://www.apcmedia.com/salestools/PMAR-9DNLQK/PMAR-9DNLQK_R1_EN.pdf
  • gkcagkca Member Posts: 243 ■■■□□□□□□□
    I use the apcupsd for that with great success, it might be a bit tricky to set up initially if you have each server and SAN connected to multiple UPS's, but it's very easy to customize and replicate the config once you figured it out.
    Here's the link apcupsd | A daemon for controlling APC UPSes
    "I needed a password with eight characters so I picked Snow White and the Seven Dwarves." (c) Nick Helm
  • Rick9Rick9 Member Posts: 27 ■□□□□□□□□□
    I tried to use NUT but couldn't configure properly.
    There's a version for ESXi, if you don't understand French don't worry, there's a readme in English inside the zip file.
    Client NUT pour ESXi 5 @ Le journal de René
    joelsfood wrote: »
    You just asked the wrong people. :) APC has a solution for it, as it's their product doing the work, not VMWares.

    PowerChute Network Shutdown

    I've not used it on 5/6, but works well on 4.1

    Here's the doc for VMware setup

    http://www.apcmedia.com/salestools/PMAR-9DNLQK/PMAR-9DNLQK_R1_EN.pdf

    Good solution but it doesn't work on lo-level UPS (like ours for instance) icon_sad.gif
    gkca wrote: »
    I use the apcupsd for that with great success, it might be a bit tricky to set up initially if you have each server and SAN connected to multiple UPS's, but it's very easy to customize and replicate the config once you figured it out.
    Here's the link apcupsd | A daemon for controlling APC UPSes

    Nice, I'll try to implement it on our setup.
    May I ask you for help should I need it?
  • Rick9Rick9 Member Posts: 27 ■□□□□□□□□□
    I tried to use NUT but couldn't configure it properly, thankfully an UPS is not mandatory in our testing setup.
    There's a version for ESXi (inside the zip file there a readme in english) here.
  • gkcagkca Member Posts: 243 ■■■□□□□□□□
    Rick9 wrote:
    Nice, I'll try to implement it on our setup.
    May I ask you for help should I need it?
    Sure, I'd be happy to help. Maybe I'll finally stop being lazy and resume blogging after a long hiatus and just write a tutorial on the subject ;)
    "I needed a password with eight characters so I picked Snow White and the Seven Dwarves." (c) Nick Helm
  • DeathmageDeathmage Banned Posts: 2,496
    gkca wrote: »
    Sure, I'd be happy to help. Maybe I'll finally stop being lazy and resume blogging after a long hiatus and just write a tutorial on the subject ;)

    What I've been doing is when I figure out a solution to something and I found it to be useful I've been updating my blog along the way. My job is awesome when I solve a problem both me and my co-worker update our technical blogs. Our thought is if it has plagued us I'm sure someone else will have the problem and knowledge is good if shared!!!!
  • jibbajabbajibbajabba Member Posts: 4,317 ■■■■■■■■□□
    Sounds like it is a solution for non-vSan clusters mainly?
    My own knowledge base made public: http://open902.com :p
  • DeathmageDeathmage Banned Posts: 2,496
    Ya it does, never did it with a vSAN setup so I can't speak literally.. Got the Network Shutdown tool on the vCenter working with the .ova Appliance but looks like I need to order a management nic card for the UPS. We have the main unit plus two extra battery packs for 195 minutes of runtime for the SAN, two iSCSI switches, and twin ESXi hosts plus the Network stack, Sonicwall(s) and KVM that has a VGA/USB redirection to the vCenter VM for KVM management in a pinch.

    Now to only see if i can specify which VM's to shutdown with the Appliance not just VM's as a generic term.

    But will tinker with that on Monday, today I'm subnetting till my eyes pop out, re-scheduled my CCENT exam in 2 weeks now that I don't have a IT overhaul to deal with now. icon_wink.gif
  • kendr1ckkendr1ck Member Posts: 11 ■□□□□□□□□□
    If you don't have a network management card in your APC UPS, you can install Powerchute Business Edition on a physical server connected to the UPS and configure a powershell script that shuts down your VMs and your hosts. In Powerchute, on a battery event, you can specify script files to run prior to shutting down the OS. That's what I've done in the past.
  • jibbajabbajibbajabba Member Posts: 4,317 ■■■■■■■■□□
    Deathmage wrote: »
    * snip *

    What happened to old-skool

    power_switch_350.jpg
    My own knowledge base made public: http://open902.com :p
Sign In or Register to comment.