5 Replies Latest reply on Jul 14, 2011 1:43 PM by Christopher Dale

    Is there a BLCli command to perform a ...ReProvision Later function

    Christopher Dale

      Hello all

      I want to call a BLCI command to run the same command as the richt click "Re-Provision Later" that is in the GUI for Devices.


      Any help would be great...


      I am running BBSA 8.0 SP9


      Chris Dale

        • 1. Is there a BLCli command to perform a ...ReProvision Later function
          Daniel Tharby

          Hi Chris,


          I haven't used it myself but there is a command called reProvisionDevice under the Provision workspace in the BLCLI unreleased command set.


          If you have created the required HTML files, then look at the Proviision-List.html and you will see the link to reProvisionDevice.


          alternatively, here is the information for the command -

          Command Name : reProvisionDevice

          Do not modify, published by technical writer

          Name space : Provision

          Command Type : Complex

          Release command : true

          Author :

          Atul Gore

          Description :

          This command re-provisions a device. If approval is enabled for the job type use the other command which takes in approval id as an additional input. This command is the same as the provisionDevice command, except that it works on devices that are already in the provisioned state. This command first decommissions the server associated with the provisioned device, and then starts re-provisioning the device.

          The input file URL should be a valid java.net.URL pointing to a text file conforming to the java.util.Properties format. Property entries in this file should be as follows:

          • Server.Property.prop_name=value, where prop_name is the name of a server property.
          • SystemPackage.LocalProperty.prop_name=value, where prop_name is the name of a property of the given system package.
          • Network.network_setting=value, where network_setting is a PXE or JumpStart network setting.

          NIM devices do not require any network keywords. Use parameterization via local properties as necessary.

          The following network settings are common between PXE and JumpStart devices:

          • Network.DHCPEnabled=[true or false]
          • Network.IPAddress=[valid v4 ipv4 address]
          • Network.SubNetMask=[valid subnet mask ipv4 format]
          • Network.DefaultGateway=[valid ipv4 address]

          If Network.DHCPEnabled is set to true, settings for Network.IPAddress, Network.SubNetMask and Network.DefaultGateway are ignored.


          The (additional) valid Network settings for a PXE device are:

          • Network.AutoDNSEnabled=[true or false]
          • Network.DNSAddress.Primary=[valid ipv4 address]
          • Network.DNSAddress.Secondary

          If Network.AutoDNSEnabled is set to true, settings for Network.DNSAddress.Primary and Network.DNSAddress.Secondary are ignored.

          The (additional) valid Network settings for a JumpStart device are:

          • Network.EnablePrimaryInterface=[true or false]
          • Network.UseIPv6=[true or false]
          • Network.NameService.Type=[NIS | NIS+ | DNS | LDAP | NONE]
          • Network.NameService.DomainName=domain_name

          If Network.NameService.Type equals "NIS" or "NIS+", you must specify the following settings:

          • Network.NameService.NameServerHostName=name_server_host_name
          • Network.NameService.NameServerIPAddress=[valid ipv4 address]

          If Network.NameService.Type equals "DNS", use the following required and optional settings:

          • Network.NameService.PrimaryDNSServer=[valid ipv4 address] (required)
          • Network.NameService.SecondaryDNSServer=[valid ipv4 address] (optional)
          • Network.NameService.TertiaryDNSServer=[valid ipv4 address] (optional)
          • Network.NameService.AdditionalDomains=domains, where domains is a comma-separated list of domains (optional)

          If Network.NameService.Type equals "LDAP", you can use the following optional settings:

          • Network.NameService.ProfileName=profile_name (optional)
          • Network.NameService.ProfileServerIP=[valid ipv4 address] (optional)
          • Network.NameService.ProxyDN=proxy_dn (optional)
          • Network.NameService.ProxyPassword=proxy_password (optional)

          If Network.NameService.Type equals "NONE", all network settings in the file are ignored.


          Return type : DBKey

          Command Input :

          Variable NameVariable TypeDescription
          systemPackageId Integer Integer ID of the system package.
          macAddress String MAC address of the device to be re-provisioned.
          aclTemplateId Integer ACL template to apply to the server that will be added to Configuration Manager, once it is provisioned. If you want to use default ACLs, set this variable to 0.
          propsFileURL String URL to the input file containing device properties.



          The following example shows how to re-provision a device that has the MAC address 11-aa-22-bb-33-cc using a system package with ID 2000000. This example uses an ACL template with ID 1. The file propfile.txt, residing on the root directory of the local machine, is the input file for the device properties.



          Provision reProvisionDevice 2000000 11-aa-22-bb-33-cc 1 file:///c:/propfile.txt






          • 2. Is there a BLCli command to perform a ...ReProvision Later function
            Christopher Dale

            I am aware of that command... but here is my problem... I have written a BAO workflow to simplify the provisioning process...it will add the mac as the users role and then setup the provisioning job and start the provision... my problem is when a VM is reprovisioned from a windows server (WindowsAdminRole) to a Unix server (Unix Admin Role) the new User doesn't have rights to re-provision the device so i want to decommission the sever as BLAdmins Role) then provision the device using the correct role (windows or Unix) so all permissioning is set correctly within Blade.


            i can De-commission the server just fine but the device doesn't get re-set to Discovered. so i have to log in to the Bladelogic interface to reset the Device using the Re-Provision Later command then my BOA workflow will complete.. What i am looking for is a command line version of the "re-provission latter" command.

            • 3. Re: Is there a BLCli command to perform a ...ReProvision Later function
              Bill Robinson

              Try the ProvDevice.setState command.  you’ll have to create a state object and I’m not sure how to do that ☺


              The other option is to remove the device and re-import it.  you’d lose history but maybe that doesn’t matter.

              • 4. Re: Is there a BLCli command to perform a ...ReProvision Later function
                Christopher Dale

                do you have and documentation on the provdevice.setState command i can find nothing...

                • 5. Re: Is there a BLCli command to perform a ...ReProvision Later function
                  Christopher Dale

                  here is what i ended up doing...


                  i ran the command to extract undocumented cli commands and read thru the options.... to see how to do this click here to view a doc on this site.


                  I found the following Command It works just like the Re-Provision link in the GUI...I added this command to my workflow and now everything works as expected.


                  I had to execute it by calling with the following option...


                  from a linux server

                  blcli -Dcom.bladelogic.cli.debug.release-only="false" ProvisionDevice cleanupDeviceAndRediscoverForJobAbort pmDeviceId true



                  Command Name : cleanupDeviceAndRediscoverForJobAbort

                  Name space : ProvisionDevice

                  Command Type : Load

                  Release command : false

                  Description :


                  Return type : void

                  Command Input :

                  Variable NameVariable TypeDescription
                  pmDeviceId Integer no description
                  decommServer Boolean no description

                  Invoked commands in order :

                  CommandInputReturn value stored name
                  ProvisionDevice.cleanupDeviceAndRediscoverForJobAbort-api$pmDeviceId$ $decommServer$-