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.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-30 04:05 AM . Last Modified: 2024-03-08 04:35 AM
I've looked at various configuration examples and read the manuals and help pages, but I can't quite understand how shutdown command file and SSH settings work.
When exactly is the shutdown command file run? Can I use SSH settings to execute commands on VMs, not just on VMware hosts? To me it seems that both are run too late in the shutdown sequence to be able to be used on VMs.
The scenario is that I have high priority VMs, vCenter Server VM is medium priority and all other VMs are lower priority. I need to execute commands on the high priority VMs before they are shut down but after vCenter has shut down.
Is this possible?
In the manual I found this:
"The VM Shutdown Duration can be set to 0 seconds for any priority group to handle any special VMs that need to be shut down later in the shutdown sequence via a command file or SSH action.
If you set a 0 second shutdown duration for a priority group, the shutdown action will be skipped for all VMs in that priority group."
So would this delay the VM shutdown so they are still turned on when shutdown command file or SSH action is run?
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-06-30 04:05 AM . Last Modified: 2024-03-08 04:34 AM
Hi,
With PCNS 4.3 the SSH actions run after the hosts are taken out of maintenance mode, so before VM startup. The original intent is to allow for shutdown and startup of remote systems.
On 9/18/2019 3:29 AM, Bartolo said:Will I have to manually shutdown any high priority VMs that have 0 second shutdown duration?
If not manually power off they will crash when the host is powered off.
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-06-30 04:05 AM . Last Modified: 2024-03-08 04:35 AM
Hi,
On 9/16/2019 2:02 PM, Bartolo said:So would this delay the VM shutdown so they are still turned on when shutdown command file or SSH action is run?
Yes. The VMs would not be powered off by PCNS so they would be available.
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-06-30 04:05 AM . Last Modified: 2024-03-08 04:35 AM
Ok thanks, I'll try it out.
How about after startup, is there a way to run a command on high priority VMs before other VMs get started?
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-06-30 04:05 AM . Last Modified: 2024-03-08 04:35 AM
Hi,
On 9/16/2019 3:24 PM, Bartolo said:How about after startup, is there a way to run a command on high priority VMs before other VMs get started?
We may make a change in a future release but as of now the answer is no.
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-06-30 04:05 AM . Last Modified: 2024-03-08 04:35 AM
That would be a nice feature. Is the SSH action on startup only intended to be run on the ESXi hosts?
Will I have to manually shutdown any high priority VMs that have 0 second shutdown duration? Or will Powerchute try to shut them down after some period?
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-06-30 04:05 AM . Last Modified: 2024-03-08 04:34 AM
Hi,
With PCNS 4.3 the SSH actions run after the hosts are taken out of maintenance mode, so before VM startup. The original intent is to allow for shutdown and startup of remote systems.
On 9/18/2019 3:29 AM, Bartolo said:Will I have to manually shutdown any high priority VMs that have 0 second shutdown duration?
If not manually power off they will crash when the host is powered off.
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-06-30 04:05 AM . Last Modified: 2024-03-08 04:34 AM
Ok, thanks for that. Are there any side effects in changing the Powerchute service to run as user account instead of local system account on Windows? I'd probably need to do that to make my scripts work.
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-06-30 04:05 AM . Last Modified: 2024-03-08 04:34 AM
Or alternatively I could use SSH action, but at which point are they run in the shutdown sequence?
If I set an SSH action to act on a VM that has high priority and 0 second duration on shutdown, will it run before or after the shutdown command file?
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-06-30 04:05 AM . Last Modified: 2024-03-08 04:34 AM
I tested the command order and SSH action is run before shutdown command file. I have to work around that but it's doable.
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.