12 Replies Latest reply on Mar 24, 2014 5:32 PM by Bill Robinson

    BLCLI doc for bare matel provisioning

      Hi,

       

      Is there any blcli doc for bare matel provisioning for create sys pkg , importing MAC address and execute prov job with the help of blcli?

      I have checked BLCLI help online does provide clear idea of this?

      Thanks

      Raj

        • 1. Re: BLCLI doc for bare matel provisioning
          Isaac Matta

          Are you trying to do all these exclusively with BLCLI commands ?

           

          We have below unreleased command for creating System Package. Not sure we have anything for importing MAC addresses into it.

           

           

          Command Name : createSystemPackage

           

           

          Name space : SystemPackage

           

           

          Command Type : Complex

           

           

          Release command : false

           

           

          Author :

           

           

          Craig Sidorchuk

           

           

          Description :

           

           

          Return type : DBKey

           

           

          Command Input :

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           


           

          Variable Name


           

           

          Variable Type


           

           

          Description


           

           

          name


           

           

          String


           

           

          none


           

           

          description


           

           

          String


           

           

          none


           

           

          system_package_type_id


           

           

          Integer


           

           

          none


           

           

          locale_id


           

           

          Integer


           

           

          none


           

           

          computer_name


           

           

          String


           

           

          none


           

           

          cm_device_name


           

           

          String


           

           

          none


           

           

          group_id


           

           

          Integer


           

           

          none


           

           

          timezone_id


           

           

          Integer


           

           

          none


           

           

          keyboard_id


           

           

          Integer


           

           

          none


           

           

          mouse_id


           

           

          Integer


           

           

          none


           

           

          user_name


           

           

          String


           

           

          none


           

           

          org_name


           

           

          String


           

           

          none


           

           

          admin_pass


           

           

          String


           

           

          none


           

           

          domain_admin_user


           

           

          String


           

           

          none


           

           

          domain_admin_pass


           

           

          String


           

           

          none


           

           

          domain


           

           

          String


           

           

          none


           

           

          workgroup


           

           

          String


           

           

          none


           

           

          os_license


           

           

          String


           

           

          none


           

           

          pnp_paths


           

           

          String


           

           

          none


           

           

          ks_net_device


           

           

          String


           

           

          none


           

           

          path_to_oem


           

           

          String


           

           

          none


           

           

          is_auto_gen_name


           

           

          Boolean


           

           

          none


           

           

          is_in_domain


           

           

          Boolean


           

           

          none


           

           

          is_create_domain_acct


           

           

          Boolean


           

           

          none


           

           

          is_extend_oem_partition


           

           

          Boolean


           

           

          none


           

           

          is_use_disk_part_script


           

           

          Boolean


           

           

          none


           

           

          is_use_component_script


           

           

          Boolean


           

           

          none


           

           

          is_install_rscd


           

           

          Boolean


           

           

          none


           

           

          is_run_post_install_job


           

           

          Boolean


           

           

          none


           

           

          is_license_per_server


           

           

          Boolean


           

           

          none


           

           

          is_custom_oem_path


           

           

          Boolean


           

           

          none


           

           

          is_custom_unattened_file


           

           

          Boolean


           

           

          none


           

           

          num_concurrent_conn


           

           

          Integer


           

           

          none


           

           

           

          Thanks,
          Isaac

          • 2. Re: BLCLI doc for bare matel provisioning
            Edwin Lindeman

            check out these commands to help you provision from blcli

             

            Provision importDeviceWithBootImage

             

            ProvisionDevice bulkSetProvisionDevicePropertyValue

             

            Best Regards

            • 3. Re: BLCLI doc for bare matel provisioning

              Thanks for replies.

               

              actually i tried with another way ... export sys package get the *xml files update the field and import back to the BL ... but getting system already exists with the same name and unable to append the old sys pkg with the new update one..

               

              so created new sys group with the named OLD-pkg and trying to moving out the old sys pkgs to newly created sys group... and getting below error message and not getting any command for moving the depot content from old to new location..

               

               

              blapp% FROM_DEPOT_GROUP=/Prov

              blapp% DEPOT_FILE_NAME=Win2k8

              blapp% TO_DEPOT_GROUP=/Prov/OLD-Pkg

              blapp% blcli_execute DepotFile moveByGroupAndName $FROM_DEPOT_GROUP $DEPOT_FILE_NAME $TO_DEPOT_GROUP

              Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundException: Name space :

              DepotFile has no commands by name : moveByGroupAndName

              blapp%

              • 4. Re: BLCLI doc for bare matel provisioning
                Bill Robinson

                Why are you trying to create a system package w/ the blcli ?

                1 of 1 people found this helpful
                • 5. Re: BLCLI doc for bare matel provisioning
                  Ankur Maloo

                  try this:

                   

                  Command Name : moveByTypeGroupAndName

                  Name space : DepotObject

                  Command Type : Complex

                  Release command : false

                  Author :

                  Joe Lawrence

                  Description :

                  Find a depot object given the depot object name, type and the full path to the parent group and move it to another group given full path. Some model names: NSHSCRIPT BLPACKAGE MSI_WINDOWS_INSTALLABLE

                  Return type : DBKey

                  Command Input :

                  Variable NameVariable TypeDescription
                  fromGroupName String Group where object is located
                  DepotObjName String Name of object
                  toGroupName String Full path to where it is to be moved
                  modelType String ModelType name from ModelType.java
                  • 6. Re: BLCLI doc for bare matel provisioning

                    I created one script for this purpose ... but it is not working??

                     

                    #!/bin/nsh

                    #acquire-credentials

                     

                     

                    blcred cred -acquire -profile TEST -username BLAdmin -password bladmin

                     

                     

                    export BL_AUTH_PROFILE_NAME=TEST

                    export BL_RBAC_ROLE=BLAdmins

                     

                     

                    echo "Now moving SysPkg to the BL system..........."

                     

                     

                    FROM_DEPOT_GROUP=/Prov

                    DEPOT_FILE_NAME=Win2k8

                    TO_DEPOT_GROUP=/Prov/OLD-Pkg

                    MODEL_TYPE=SYSTEMPACKAGE

                     

                     

                    blcli_execute DepotGroup moveByTypeGroupAndName $FROM_DEPOT_GROUP $DEPOT_FILE_NAME $TO_DEPOT_GROUP $MODEL_TYPE

                     

                     

                    if [ $? = 0 ]

                    then

                    echo "System Pkg has been moved successfully............."

                     

                     

                    else

                      echo "There is an error while moving..........."

                     

                     

                    fi

                     

                    blapp% nsh moving.nsh

                    Authentication succeeded: acquired session credential

                    Now moving SysPkg to the BL system...........

                    Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundException: Name space :

                    DepotGroup has no commands by name : moveByTypeGroupAndName

                    There is an error while moving...........

                    • 7. Re: BLCLI doc for bare matel provisioning
                      Ankur Maloo

                      what is the BSA version? the one I sent is from BSA 8.2

                       

                      If it is not 8.2, please generate unreleased commands using Unreleased blcli commands and documentation and then check in DepotObject name space, may be it is renamed

                      • 8. Re: BLCLI doc for bare matel provisioning

                        i have generated the unreleased blcli with help of above linke , bu do not how to use this with my script and what command i should execute from the nsh prompt to run my nsh script

                        • 9. Re: BLCLI doc for bare matel provisioning

                          Could you provide more details so we can understand what you are trying to accomplish, specifically?   Bill is right, there is usually not much reason to create a System Package using BLCLI. 

                          • 10. Re: BLCLI doc for bare matel provisioning

                            we have in-house portal to provision VM And Bare matel machine , and i want to integrate Sys pkgs and prov job with that portal ... for this , i am planning to use export / import and sys pkgs and move old pkg to certain depot folder to skip overwrite...

                            • 11. Re: BLCLI doc for bare matel provisioning
                              Bill Robinson

                              Why would you need to create a system package on the fly ?

                              • 12. Re: BLCLI doc for bare matel provisioning
                                Bill Robinson

                                So the requirement was that the user be able to define pretty much anything in the system package.  there were a few parameters that did not seem possible to easily parameterize so this seemed to be the only option.  so you can do this;

                                 

                                ----

                                #!/bin/nsh

                                blcli_setoption serviceProfileName defaultProfile

                                blcli_setoption roleName BLAdmins

                                blcli_connect

                                timeStamp="`date '+%Y%m%d-%H%M%S'`"

                                 

                                blcli_execute DepotGroup groupNameToId "/Workspace/Test"

                                blcli_storeenv group_id

                                 

                                name="Windows2008-${timeStamp}"

                                description="blcli created package"

                                system_package_type_id=32

                                locale_id=1257

                                locale_name="0407:00000407"

                                computer_name="pxe"

                                cm_device_name="pxe"

                                timezone_id=4052

                                timezone_name="US/Eastern"

                                keyboard_id=0

                                mouse_id=0

                                user_name="BMC"

                                org_name="BMC"

                                admin_pass="n3wy34rBL"

                                domain_admin_user=""

                                domain_admin_pass=""

                                domain=""

                                workgroup="DEMODRIVE"

                                os_license="12345-12345-12345-12345-12345"

                                pnp_paths=""

                                ks_net_device=""

                                path_to_oem=""

                                is_auto_gen_name=false

                                is_in_domain=false

                                is_create_domain_acct=false

                                is_extend_oem_partition=false

                                is_use_disk_part_script=false

                                is_use_component_script=false

                                is_install_rscd=true

                                is_run_post_install_job=false

                                is_license_per_server=false

                                is_custom_oem_path=false

                                is_custom_unattened_file=false

                                num_concurrent_conn=5

                                 

                                blcli_execute SystemPackage createWindowsSystemPackage "${name}" "${description}" ${system_package_type_id} ${locale_id} "${computer_name}" "${cm_device_name}" ${group_id} ${timezone_id} "${user_name}" "${org_name}" "${admin_pass}" "${domain_admin_user}" "${domain_admin_pass}" "${domain}" "${workgroup}" "${os_license}" "${pnp_paths}" "${path_to_oem}" ${is_auto_gen_name} ${is_in_domain} ${is_create_domain_acct} ${is_install_rscd} ${is_run_post_install_job} ${is_license_per_server} ${is_custom_oem_path} ${num_concurrent_conn}

                                blcli_storeenv spKey

                                 

                                blcli_execute SystemPackage findByDBKey ${spKey}

                                blcli_execute Utility storeTargetObject syspackref

                                blcli_execute SystemPackage setUseDiskPartScript ${is_use_disk_part_script}

                                blcli_execute SystemPackage setUseComponentScript ${is_use_component_script}

                                blcli_execute SystemPackage setCustomUnattendFile ${is_custom_unattened_file}

                                for osCompId in {401..411}

                                    do

                                    blcli_execute SystemPackage addOsComponentId ${osCompId}

                                done

                                blcli_execute SystemPackage update NAMED_OBJECT=syspackref

                                blcli_execute SystemPackage getDBKey

                                blcli_storeenv spKey

                                 

                                 

                                 

                                blcli_execute SystemPackage setNetworkAdapterInfo ${spKey} false "192.168.66.111" "255.255.255.0" "192.168.66.1" false "192.168.66.1" "192.168.66.2"

                                blcli_storeenv spKey

                                 

                                blcli_execute SystemPackage findDiskPartitionIdByName NTFS

                                blcli_execute Utility storeTargetObject disk_type

                                blcli_execute DiskPartition createInstance

                                blcli_execute Utility setTargetObject

                                blcli_execute Utility storeTargetObject disk_partition

                                blcli_execute DiskPartition setName C

                                blcli_execute DiskPartition setPartitionSize 15000

                                blcli_execute DiskPartition setFillUnusedSpace false

                                blcli_execute DiskPartition setForceTobePrimary true

                                blcli_execute DiskPartition setQuickFormat true

                                blcli_execute DiskPartition setPartitionTypeId NAMED_OBJECT=disk_type

                                blcli_execute SystemPackage addDiskPartition ${spKey} NAMED_OBJECT=disk_partition

                                blcli_storeenv spKey