Windows recipes

This is the documentation for the deprecated product DCImanager 5. It is no longer updated and may be irrelevant. Documentation for the current version of DCImanager can be found in the DCImanager 6 section.

DCImanager uses PowerShell to run Windows recipes. The full name of the executed file is %windir%\System32\WindowsPowerShell\v1.0\powershell.exe

Details.
Note.

This information is only for Windows Server 2016.

For correct operation of recipes use the latest OS template. 

Script start algorithm 

  1. The macro $HAS_RECIPE is checked. It is executed in the response file for Windows installations /DCI/ISPsystem__Windows Server 2016/Unattend.xml. If the value equals 1, remote execution of scripts is allowed on the server:  the script winrm_listener.ps1 is started. 

    Full name
    /DCI/ISPsystem__Windows Server 2016/win2016/sources/$OEM$/$$/SETUP/SCRIPTS/winrm_listener.ps1
  2. The recipe file is uploaded to the server by the URL from the macros $AFTER_INSTALL_SCRIPT_HTTPS. 

    URL format
    https://mydci.com:1500/dcimgr?func=osinstall.afterscript&id=randId
    Details
  3. The script is executed. 
  4. The option that allows executing scripts remotely is disabled automatically with the script winrm_disabler.ps1

    Full name
    /usr/local/mgr5/etc/winrm_disabler.ps1

OS installation parameters 

General information about OS installation is kept in the file /usr/local/mgr5/var/operations/operId.server_os_install. For example, what OS template or password was used. The values of the macros $HAS_RECIPE and $AFTER_INSTALL_SCRIPT_HTTPS that was used for OS installation are kept in /usr/local/mgr5/var/operations/operId.server_os_install.params

Details

Logs

The script executions logs are added to /usr/local/mgr5/var/runrecipe_dci.log. To save script execution results increase the logging level to 9 for the modules runrecipe, dci_osinstall, dci_operations. To do so, add the following records to /usr/local/mgr5/etc/debug.conf:

.*runrecipe_dci 9
.*dci_osinstall 9 
.*dci_operations 9