DX Unified Infrastructure Management

 View Only
  • 1.  Why does a package post-install command fail?

    Posted Aug 29, 2018 03:32 PM

    I am taking my first steps with UIM package creation, investigating what can and cannot be done with each field/parameter in the GUI, so if my question seems unusual, this is why.

     

    I have created a new, empty package, with the following parameters:

    <package info>
       name = Training-New_Folder
       description = Create a folder using the Pre/Post Install Commands
       copyright = (C) Copyright 2018
       group = Training
       author = my_name
       date = 8/29/2018
       version = 1.0
       build = 2
       no_drop = no
    </package info>
    <Windows>
       name = Training-New_Folder
       type = simple
       OStype = windows
       OS =
       pre-install = mkdir C:\New_Folder_PreInstallCommand
       post-install = mkdir C:\New_Folder_PostInstallCommand
       update =
    </Windows>

    After deployment to a Windows VM, the folder "PreInstall" is created, but "PostInstall" is missing.  Furthermore, there is an error in the log file 'C:\Program Files (x86)\Nimsoft\robot\controller.log':

     

    Aug 29 15:12:08:346 [3068] Controller: --------------------------------------------------------------------------------------------------------
    Aug 29 15:12:08:346 [3068] Controller: ----- Robot controller 7.80 [Build 7.80.3132, Jun  1 2015] started -----
    Aug 29 15:12:08:346 [3068] Controller:  Name   = winrm, IP = IP, Port = 48000
    Aug 29 15:12:08:346 [3068] Controller:  OS     = Windows / Windows Server 2012 R2 Standard Evaluation, 64-bit / Service Pack 0 Build 9600
    Aug 29 15:12:08:346 [3068] Controller:  Domain = TheEvilNetwork
    Aug 29 15:12:08:346 [3068] Controller:  Primary HUB = /TheEvilNetwork/Nimsoft_hub/Nimsoft IP
    Aug 29 15:12:08:346 [3068] Controller:  Loglevel = 0, Logfile = controller.log
    Aug 29 15:12:08:346 [3068] Controller:  Running as user SYSTEM
    Aug 29 15:12:08:346 [3068] Controller: -----
    Aug 29 15:12:08:346 [3068] Controller: Controller on winrm port 48000 started
    Aug 29 15:12:09:346 [3068] Controller: Hub Nimsoft_hub(IP) contact established
    Aug 29 15:14:55:736 [3068] Controller: post-install 'mkdir C:\Training-New_Folder_PostInstallCommand' failed, error = The system cannot find the file specified.   (2)
    Aug 29 15:14:55:736 [3068] Controller: inst_execute - error in attempt to run post-install 'mkdir C:\Training-New_Folder_PostInstallCommand'

     

    Why is the post-install command failing?



  • 2.  Re: Why does a package post-install command fail?

    Broadcom Employee
    Posted Aug 29, 2018 04:49 PM

    Usually in UIM when you have a field for a command it is expecting a name of a batch file or script that is local to the probe and does not have spaces in the command line.

    I would suggest creating  batch file called pre-install.bat and once called post-intall.bat to run your commands from there.



  • 3.  Re: Why does a package post-install command fail?

    Posted Aug 30, 2018 10:58 AM

    I modified the package by adding "cmd.exe /C" to the beginning of the pre/post install commands and it created both folders without issue.

     

    <Windows>
       name = Training-New_Folder
       type = simple
       OStype = windows
       OS =
       pre-install = cmd.exe /C mkdir C:\New_Folder_PreInstallCommand
       post-install = cmd.exe /C mkdir C:\New_Folder_PostInstallCommand
       update =
    </Windows>

    So while this is not an answer, it is a viable workaround.