Loading ...

Understanding command file & SSH execution time | UPS Management Devices & PowerChute Software

Home » Spaces » UPS Management Devices & PowerChute Software » discussion » General » Understanding command file & SSH execution time

Understanding command file & SSH execution time

Discussion in UPS Management Devices & PowerChute Software started by Bartolo , 9/16/2019 6:02 PM
Login to follow, share, and participate in this space.
Not a member?Join now
Announcement 

Please review Schneider Electric Knowledge Base articles for assistance with most technical support questions.  http://www.apc.com/us/en/faqs

Posted in: General

Understanding command file & SSH execution time

Subscribe to RSS
  • Bartolo

    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?

  • wpasquil

    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. 

  • Bartolo

    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?

  • wpasquil

    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. 

  • Bartolo

    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?

  • wpasquil
    This discussion is marked as answered

    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.

  • Bartolo

    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.

  • Bartolo

    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?

  • Bartolo

    I tested the command order and SSH action is run before shutdown command file. I have to work around that but it's doable.

Page 1 of 1 (9 items)
Choose your language:  
powered by Communifire
Version 6.0.7207.29305