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.
Posted: 2021-07-01 01:30 AM . Last Modified: 2024-03-06 01:37 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:30 AM . Last Modified: 2024-03-06 01:37 AM
Good afternoon,
We have two clustered ESXi 5 hosts that I want to configure controlled PCNS shutdowns for. I've downloaded the VMA and installed PCNS 3.0.1 for ESXi upon the VMA. I'm guessing that to configure the shutdown event times for our two ESXi hosts I log onto the https://IPADDRESS:6547 of the VMA and configure the "LOCALHOST > Configure events > UPS on battery" timings and then in the event of an outage the APC UPS management card will contact the VMA which will then in turn contact the ESXi hosts (after the period of seconds configured above???) and issue a controlled shutdown command IF the outage doesn't end?
Second question, if ESXi hosts receive the controlled shutdown command - I assume they have enough time to firstly shutdown all of the hosted VM's? We have a clustered / HA environment and therefore I understand that the "controlled shutdown configuration" is "greyed out" and therefore there is a script that needs to be created as a workaround? Is this correct? Does anyone have any further details on this?
Are my assumptions correct? Is there anything that I'm overlooking? Thank you to anyone taking the time to read this.
Regards.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
you're welcome!
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:30 AM . Last Modified: 2024-03-06 01:37 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:30 AM . Last Modified: 2024-03-06 01:37 AM
Thank you for all your help. Greatly appreciated. I just need to test it now! Many thanks.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:30 AM . Last Modified: 2024-03-06 01:37 AM
hello,
i don't know much on this topic to be honest but i'd like to share this document with you to see if it helps answer any if your questions:
1.) go to http://www.apc.com/site/support/index.cfm/faq/
2.) search for FA159784
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:37 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:37 AM
Thank you for your response! 🙂 That answer my second question - YES, I do need to use a script when in HA for a controlled shutdown of the hosted VM's.
Could any help me with my first question?
Cheers,E
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:37 AM
well, based on your question, that is how it'd work in a normal scenario for a shutdown. then you'd have to configure ESXi to shutdown your guest VMs which is also a document in our knowledgebase. i don't know if the clustering would affect that particular scenario in any way.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:37 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:37 AM
So logging onto the https://IPADDRESS:6547 of the VMA and configuring the "LOCALHOST > Configure events > UPS on battery" timings does control the timing of the shutdown of the ESXi hosts?
Both of which (hosts) I configured into the VMA with the vifp addserver
Sorry just want to be crystal clear that this is correct and you mentioned that this isn't a subject you know much about.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:37 AM
yes, maybe i should be quiet, lol.
here is what i know about PowerChute in general. for any client, no matter what operating system it is, you can log in and configure "UPS: Time on battery" and set it that after X seconds on battery, PCNS will begin a shutdown of the host where that software is installed. with VMWare or other virtualization platforms, then the added addition is that you need to tell the guests to shutdown, which we have FA159688 @ http://www.apc.com/site/support/index.cfm/faq/ that talks about shutting down the guests.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:37 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:37 AM
I don't recall telling you to be quiet - you started your response off by stating "I don't know much about this topic". I work in a corporate environment - should something have failed within our infrastructure due to configuration put in place by myself on the advice of someone who openly admits they "don't know much about the topic" I'd have my P45 force-fed to me and be in the bread-lines before the day was out... and rightly so. That's why I wanted confirmation from someone with experience of Powerchute otherwise I wouldn't have put a post in here.
I do appreciate your assistance - I'm aware that the controlled shutdown of the hosted VM's needs to be configured through the ESXi hosts "Virtual Machine Startup and Shutdown" config which is greyed out in my instance as we have a clustered / HA environment and therefore a script is required to accomplish this. What I was unsure about was where the shutdown xxx timings are configured for the ESXi hosts. I was assuming it was through the VMA LOCAL HOST > Configure events page but just wanted to double check – it seems very obvious and probably is the case but I just wanted to be 110% sure as I didn’t want to find out I was wrong following a minor power outage which then caused our cluster to shut down.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:37 AM
i know and i understand, i was more just kidding so that we can get some other feedback. i am familiar with PowerChute but not as much in these types of environments, specifically clustering. i believe we are correct here but we can wait for some additional confirmation/replies.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:37 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:37 AM
No worries - I do appreciate your help.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
Is there anyone that could please confirm this?
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
bump 😞
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
hello again. i asked our PCNS specialist here that I sit with who is back from vacation. here is what he said. no, there is nothing different you need to do for clustering. what you need to do is definitely find out how many minutes or seconds the script for shutting down your VMs will take in addition to how long the actual VMs will take to shutdown.
you can configure the system to begin a shutdown (which will essentially cause the script to execute) by doing what you said (configure events->UPS on battery->shutdown after X seconds). then, go to Configure Shutdown->Make sure you have this set up to execute the script we provided and make sure the delay is adequate for all of this to complete. After this is all done and set up, I'd personally recommend you go to the network management card and find the "force negotiation" option to ensure the management card is aware of the script delay and tells you your "maximum required delay." i believe that is under UPS tab->shutdown in the latest revision of the UPS network management card.
force negotiation is explained further in FA156160 in the knowledge base.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
Hey!
Apologies it has taken me so long to respond - I've been on holiday (luck me)! 🙂
I've configured the VMA to shutdown when the UPS is on battery for a 2 hour period (I couldn't configure a longer period as it was reported as an "invalid delay time"). Within "configure shutdown" I've entered the path to the script within the "Run this command file (full name):" field - the path being "/home/vi-admin/ESXIShutdown/shutdownvms_sh.mht" (just to be thorough!). I've set the delay time to 20 minutes - giving 20 minutes for all of our VM's to shutdown in a controlled fashion. I've edited the script so that now it appears as follows (could you ask your powerchute guy to take a very quick look please?)...
From: "Saved by Windows Internet Explorer 9"
Subject:
Date: Tue, 11 Sep 2012 13:09:24 +0100
MIME-Version: 1.0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://nam-en.apc.com/ci/fattach/get/1063469/
X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17609
<meta content="3D" text="" />
http-equiv=3DContent-Type>
<meta name="3DGENERATOR" content="3D" mshtml="" />
#!/bin/sh
LD_LIBRARY_PATH=3D$LD_LIBRARY_PATH:/opt/vmware/vma/lib64:/opt/vmware/vma/=
lib
export LD_LIBRARY_PATH
export PERL_LWP_SSL_VERIFY_HOSTNAME=3D0
SAVEIFS=3D$IFS
IFS=3D$(echo -en "
\b")
hosts=3D(*10.10.1.92 10.10.1.91*)
ups_vm=3D"*LATHQVMA01*"
for host in ${hosts[@]}; do
echo $host
source /opt/vmware/vma/bin/vifptarget -s $host
for i in `vmware-cmd -l username xxxxx password xxxxx`; do
if [ `vmware-cmd $i getstate | egrep -c "on"` -eq 1 ]; then
echo $i
if [ `echo $i | egrep -c $ups_vm` -eq 1 ]; then
echo "Skip shut down of VMA"
else
echo "Shutting down $i"
vmware-cmd "$i" stop soft
fi
fi
done
source /opt/vmware/vma/bin/vifptarget -c
done
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
yes, lucky you 🙂
we looked through the file and it was a little difficult because of the HTML markup in it.
regardless, the only two lines you need to edit are the hosts=( ) which i assume has *'s around it because you tried to bold it? (since those shouldnt really be there) and then line under that with the hostname.
assuming we overlook the HTML markup and the extra *'s which I think were you bolding it, it looked fine.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
Fantastic! Yes I was trying to bold the IP address thus the *'s. 🙂
One last question - on the two lines that I've edited... VMA name and host IP addresses - what is the "3D" about? Does that need to be there as I didn't see reference to that in the PDF?
Very kind regards. 🙂
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
no you dont need the 3D. I thought that was related to some HTML markup.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:31 AM . Last Modified: 2024-03-06 01:36 AM
you're welcome!
Link copied. Please paste this link to share this article on your social media post.
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.