Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rephrasing, mostly in section: Note on CHARON instance service

Anchor
TOC
TOC
Include Page
KBCOMMON:KB-CSSstyle
KBCOMMON:KB-CSSstyle

Usage

Invoke the script from the Powershell command and window, specify the configuration file and eventually – optionally – if you want to run it the script in "check" mode.

It is recommended, to execute the script interactively first using the "check" mode. Using this mode, the script will only setup the connection and execute simple remote commands doing simple display will be executed, no display commands. No shutdown will be performed.

Use Once you are satisfied with the operation of the script then , use it at your convenience from any utility (scheduler, backup agent, ...) to shutdown the CHARON instance.

 

Info

To display the script's help text, please use either this Windows command:

c:\Charon>powershell -file charon_cleanshutdown.ps1 -help

or the Powershell "get-help" command:

PS C:\Charon> get-help c:\charon\charon_cleanshutdown.ps1 -full

 

(lightbulb) To automatically restart the guest operating system running on the CHARON instance, the automatic boot on restart has to be set at SRM level and the following Windows service command has to must be usedexecuted:

c:\Charon>sc start <servicename>

 

Note on CHARON instance service:

The 'expect' mode will perform the "power off" command itself or will send the "F6" key if this command is not available, thus stopping then the service. Other The other modes will perform a clean shutdown without powering off the CHARON instance letting then , thus leaving the service active and the instance at the SRM prompt. This is why a loop is To recognize the completion of the shutdown process in this case, a loop has been introduced to check if the guest operating system running on the instance is responding responds to "ping". Once it does not respond anymoreno longer responds, the script will wait waits for a specified amount of time (waitbeforestop parameter) before stopping the service.

Examples

Check mode:

C:\Users\Administrator> powershell -file c:\charon\charon_cleanshutdown.ps1 -config c:\charon\myds20vms.ini -check

 

Shutdown execution mode:

C:\Users\Administrator> powershell -file c:\charon\charon_cleanshutdown.ps1 -config c:\charon\myds20vms.ini

 

Service restart:

C:\Users\Administrator> sc start myds20vms

 

Include Page
KBCOMMON:KB-GoToTop
KBCOMMON:KB-GoToTop