10 Replies Latest reply on Feb 28, 2012 7:33 AM by Bill Robinson

    VMware ESX provisioning, post-install script not executed

      Environment: BBSA 8.1 SP3 on Windows 2008R2.


      Does the post-install script of a Provisioning Job for an ESX4i Server 4.1 System Package type get executed on the ESXi server as a post boot script (just like any additional kickstart entries, found in /etc/vmware/init/init.d/999.firstboot*) or does it get execute on the App Server?


      I have sucessfully provisioned the ESXi 4.1 server but wish to execute some post provision commands (preferably on the App Server) and even a simple echo hello world > test.log (which sould work on either the ESXi server or the App Server) is not working.

        • 1. VMware ESX provisioning, post-install script not executed
          Bill Robinson

          if you look in the kickstart file via the system package you should see where your post-install is run (and it should run on the target) - however - i thought esxi didn't really use kickstart though?  have you been able to have this work outside blade?

          • 2. VMware ESX provisioning, post-install script not executed

            The provisioning of esxi via BladeLogic is essentially stateless and scriptless.

            I beleive you have used  the same mechanism ?

            If you want to get something run on appserver,  You can always oo it as a part of post-provisining batch job.

            Create a different Job which runs on appserver to do something you want. It can be a NSH script job that runs a script on the appserver itslef

            • 3. Re: VMware ESX provisioning, post-install script not executed
              Bill Robinson

              There’s no agent on esxi so anything you run against it needs to happen during the prov or via the VC.

              • 4. VMware ESX provisioning, post-install script not executed


                but if anything needs to be run on the APPSERVER, i think it can be a part of the post-provision batch job.

                Its true that if that something has to do anything on the esxi target, it has to make use of VC !

                • 5. VMware ESX provisioning, post-install script not executed

                  HI Gary Bromley,


                  Are you using System Package type ESxi  for this ?

                  or using the image based stateless method ?

                  I realized you are on 8.1 SP3

                  • 6. VMware ESX provisioning, post-install script not executed

                    Yes I am on 8.1 SP3 and have configured a System Package Type of "VMware ESXi Server 4.1" with the necessary boot kernel, boot image and additional image settings. I have configured a System Package based on this type using a standard kickstart entry and additonal kickstart entries that begins with a "%firstboot..." which creates virtual machine definitions on the ESX Server.

                    When a server boots from PXE it appears in the Console tree under Devices -> Imported and I then deploy the system package to the server. This all works well and ESX4i is provisioned, then server moves from Imported to Provisioned.

                    What I am trying to do is run a Post-Install Configuration Script (on the APPSERVER as part of the provisioning) that adds the newly created virtual machines via BLCLI (I have a script that gets the mac addresses).

                    There is no Virtual Centre for this ESX4i server (it's the free version with a license key and VC does support them) so this can't be used and installing a BBSA Agent on the ESX server is not an option either.


                    Right now I have a simple "echo hello world > temp.log" as the Post-Install Script and I have checked both the ESX server and the BBSA appserver for the file but it does not exist.


                    So either the Post-Install Script doesn't get executed or I have specified the command incorrectly.

                    Any pointers?

                    • 7. VMware ESX provisioning, post-install script not executed
                      Bill Robinson

                      even if you get the post-install working, it would execute in the context of the target server, and that will not have the blcli installed on it so this would not work.


                      if you are just building the ESXi system, how are you getting VMs on it so quickly?  because i don't understand how you would be adding guest VMs immediately after build the ESXi system.

                      • 8. VMware ESX provisioning, post-install script not executed

                        The VM's are created empty (just defined) and then powered on as part of the kickstart process so their mac addresses then show up as Imported (having PXE booted and then sit and wait for provisioning instructions).

                        I would like to have the post-install script run on the application server so that the newly created virtual machines can be then provisioned by BBSA automatically (i.e. create a provisioning job via blcli).

                        Fundamentally I can't confirm if the post-install job runs and if it does run, on which server it runs.


                        Any help on executing ANY type of post-install job would be helpful at this stage, i.e. should it be a script, or NSH commands, etc.

                        • 9. VMware ESX provisioning, post-install script not executed

                          There is a limitation that you cannot specify a Post-Install *Batch* job in the post install configuration for ESXi. I beleive this has been done because there is no RSCD and being agentless, it has been assumed  that any post-install batch job will always be run at the provisioned target.

                          This is not always the case, because many a times we include jobs like Licensing and set properties in this post install batch job which are executed at the appserver (runs some blclis), and not on  the target provisioned.

                          But currenlty this is disabled in ESXi by default.


                          The only way I can think of is to create a Batch job to run sequentially, the first job in this batch job will be your provisioning job for ESXi server itself, the second job should be a NSH script based job which runs on the appserver, This job will make use of BLCLI to create provisioning jobs for individual VM's.

                          You can also control stopping the batch job if the first job of provisioning ESXi itself fails  using  the batch job options !

                          I hope this makes sense, if I have understood you correctly




                          • 10. VMware ESX provisioning, post-install script not executed
                            Bill Robinson

                            yes - i agree w/ rohit here - you need a wrapper job that does your esxi build, then another job that figures out the new mac addresses and goes from there.


                            esxi will not have an rscd agent installed, and the only way to directly manage it via blade is via the VC.  you could maybe write some direct web service calls to the esxi directly and run that in a nsh script.