Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

ESX 5.1 shutdown script on vMA

APC UPS Data Center & Enterprise Solutions Forum

Schneider, APC support forum to share knowledge about installation and configuration for Data Center and Business Power UPSs, Accessories, Software, Services.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • APC UPS, Critical Power, Cooling and Racks
  • APC UPS Data Center & Enterprise Solutions Forum
  • ESX 5.1 shutdown script on vMA
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
BillP
Administrator BillP Administrator
5060
voidstar_apc
Janeway voidstar_apc
196
Erasmus_apc
Sisko Erasmus_apc
112
TheNotoriousKMP_apc
Sisko TheNotoriousKMP_apc
108
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to APC UPS Data Center & Enterprise Solutions Forum
Solved
Anonymous user
Not applicable

Posted: ‎2021-07-01 03:19 AM . Last Modified: ‎2024-03-05 10:55 PM

0 Likes
5
1097
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-07-01 03:19 AM . Last Modified: ‎2024-03-05 10:55 PM

ESX 5.1 shutdown script on vMA

Hey all I'm back again!

Please reference http://forums.apc.com/thread/14127 for my previous thread related to this.

We have an HP Proliant ML350P Gen 8 with an ESX 5.1 installed on it.  We will eventually be converting a Windows Server 2003 VM on it and we need to add a graceful shutdown option to the server.  We bought a SmartUPS 1500 to manage the power for the server.  I then followed the instructions found here in the link below to install vMA and set up PowerChute Business Edition:

http://www2.schneider-electric.com/resources/sites/SCHNEIDER_ELECTRIC/content/live/FAQS/165000/FA165...

The server is connected to the UPS via a Serial to RJ-45 cable and we are using PCBE 9.1.0 as the UPS manager program.  I get everything installed and configured the shutdown order of the machines on the vSphere.  I am now creating the shutdown script through the instructions shown on this link:

Setting up an APC UPS in ESXi

Essentially I create a shell script with the following:

#!/bin/sh

#

ssh root@192.168.150.20 halt

(192.168.150.20 is the ESX host address).  It should also be noted that we have shared keys that allow root login without a password to the ESX host (I know this is a security risk but I can find no other way to get this to work).  I save this as 'ServerShutdown.sh' in the PCBE directory (/opt/APC/PowerChuteBusinessEdition/Agent/cmdfiles) and then use sudo chmod +x ServerShutdown.sh to add the permissions for executing it.  Once I do so it shows up in the list of command files in the web browser session for PCBE as expected (Under Shutdown settings).  However when I apply the changes and try to test a shutdown nothing happens.  I unplug the UPS from the wall and it doesn't perform a graceful shutdown.  The strange thing is that when I run the shell from the command line without using the sudo prefix it works (I just type 'sh ServerShutdown.sh').  Is there some special permission we have to set to allow the script to run from the PCBE agent?

I hope I didn't drone on too long I just want to make sure you have enough details to solve the problem without having to ask for more info!  Thanks in advance for the help!!

Labels
  • Labels:
  • UPS Management Devices & PowerChute Software
  • Tags:
  • apc_ups
  • graceful_shutdown
  • PowerChute
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:20 AM . Last Modified: ‎2024-03-05 10:55 PM

0 Likes
0
1097
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-07-01 03:20 AM . Last Modified: ‎2024-03-05 10:55 PM

Did PowerChute record the loss of AC power in the event log? If it did then depending on your configuration the Host should have been notified to power down. Are you running a licensed version of ESXi or are you running the free version? PowerChute communicates to the host via RCLI and VMware disables RCLI in the free version of ESXi.

See Answer In Context

Reply

Link copied. Please paste this link to share this article on your social media post.

Replies 5
Anonymous user
Not applicable

Posted: ‎2021-07-01 03:20 AM . Last Modified: ‎2024-03-05 10:55 PM

0 Likes
0
1097
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-07-01 03:20 AM . Last Modified: ‎2024-03-05 10:55 PM

As an update, I tried adding chmod 777 to the ServerShutdown.sh document to see if that would help, but no luck.  Strange this is I had this thing working before I lost communications with the UPS as shown in my referenced article above.  So thinking that I may have done something weird to the config I recreated a test vma machine and tested it that way.  Still no luck.  Maybe there's some configuration I have to do on the ESX itself?  Just throwing out more ideas that may help clarify the situation.

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: ‎2021-07-01 03:20 AM . Last Modified: ‎2024-03-05 10:55 PM

0 Likes
0
1097
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-07-01 03:20 AM . Last Modified: ‎2024-03-05 10:55 PM

Here's the output of my sshd_config file on the ESX

/etc/ssh # cat sshd_config

# running from inetd

# Port 2200

Protocol 2

HostKey /etc/ssh/ssh_host_rsa_key

HostKey /etc/ssh/ssh_host_dsa_key

UsePrivilegeSeparation no

SyslogFacility auth

LogLevel info

PermitRootLogin yes

PrintMotd yes

PrintLastLog no

TCPKeepAlive yes

X11Forwarding no

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc

MACs hmac-sha1,hmac-sha1-96

UsePAM yes

# only use PAM challenge-response (keyboard-interactive)

PasswordAuthentication no

Banner /etc/issue

Subsystem sftp /usr/lib/vmware/openssh/bin/sftp-server

AuthorizedKeysFile /etc/ssh/keys-%u/authorized_keys

# Timeout value of 10 mins. The default value of ClientAliveCountMax is 3.

# Hence, we get a  3 * 200 = 600 seconds timeout if the client has been

# unresponsive.

ClientAliveInterval 200

Reply

Link copied. Please paste this link to share this article on your social media post.

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:20 AM . Last Modified: ‎2024-03-05 10:55 PM

0 Likes
0
1098
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-07-01 03:20 AM . Last Modified: ‎2024-03-05 10:55 PM

Why are you writing the script? PowerChute runs on the vMA and shuts down the host via RCLI. There is no need to script the shutdown yourself.

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: ‎2021-07-01 03:20 AM . Last Modified: ‎2024-03-05 10:55 PM

0 Likes
0
1098
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-07-01 03:20 AM . Last Modified: ‎2024-03-05 10:55 PM

Bill, thank you for the reply.  Before I put on the script I tried unplugging the UPS to test the graceful shutdown and it did not work.  I can try again but are there any other settings I need to have?

Reply

Link copied. Please paste this link to share this article on your social media post.

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-07-01 03:20 AM . Last Modified: ‎2024-03-05 10:55 PM

0 Likes
0
1098
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-07-01 03:20 AM . Last Modified: ‎2024-03-05 10:55 PM

Did PowerChute record the loss of AC power in the event log? If it did then depending on your configuration the Host should have been notified to power down. Are you running a licensed version of ESXi or are you running the free version? PowerChute communicates to the host via RCLI and VMware disables RCLI in the free version of ESXi.

Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of