4 Replies Latest reply on Apr 28, 2017 2:13 AM by defmania

    vRA time to provision parameters

    defmania Novice



      Just wondering if anyone came across this. Is there a simple/easy way to export, as a starting point for building a report, the parameters containing the creation details for a blueprint request? I'm interested in grabbing the exact time difference between the time when a blueprint was requested and until it was provisioned successfully. There are some parameters in the postgres db like datecreated or lastupdated, but I'm not 100% sure those are totally accurate for what I need.



        • 1. Re: vRA time to provision parameters
          rstoker13 Enthusiast
          VMware Employees

          Are you looking for a single report for each request or a periodically run report that gathers data for multiple requests? In either case, I believe vRO could be an option. Browsing the VCACCAFEHost from the administer tab in vRO, I selected a single request. The fields "dateCreated" and "dateCompleted" may be what you are looking for. See the image below.




          If a report per request is your intention, you can utilize the event broker to call a vRO workflow that gathers the data. If a periodic report is required, you could schedule a vRO workflow to run at your desired frequency that gathers previous requests. In either case, you can send an email with formatted body or attached CSV.

          • 2. Re: vRA time to provision parameters
            defmania Novice

            This is very helpful indeed!

            A periodic report is what I'm interested in. Can you please provide some tips as to how can I get started with that workflow in vRO?


            Thank you,

            • 3. Re: vRA time to provision parameters
              rstoker13 Enthusiast
              VMware Employees

              Your question inspired me to create an action as I'm sure my management will soon be asking for these very details. Please see the code below to create a CSV file located in the vRO Temp directory. You can then use a number of different methods to email the file on a scheduled basis. I have attached the action as well as included the code below. Please let me know if you have questions. Thank you.



              //Instantiate variables

              //Create csv for email. Don't hardCode the path - keep this workflow portable by using the temp folder

              var csvFile = new FileWriter(System.getTempDirectory() + "/vRArequest_report.csv");



                // Write CSV headers to file


                "\"" + "requestedItemName" + "\""

                + "," + "\"" + "dateCreated" + "\""

                + "," + "\"" + "dateApproved" + "\""

                + "," + "\"" + "dateCompleted" + "\""

                + "," + "\"" + "lastUpdated" + "\""

                + "," + "\"" + "executionStatus" + "\""

                + "," + "\"" + "requestedBy" + "\""

                + "," + "\"" + "requestedFor" + "\""

                + "," + "\"" + "state" + "\""

                + "," + "\"" + "waitingStatus" + "\""

                + "\n");



              //Get VCAC Cafe Host. If you have multiples, you may want to implement a for loop

              var inVCACCafeHost = Server.findAllForType("vCACCAFE:VCACHost")[0];

              //Get vRA Catalog Item Request

              var requests = vCACCAFEEntitiesFinder.getCatalogItemRequests(inVCACCafeHost);

              //Loop through requests to view attributes

              for each(request in requests){

                //Instantiate array of request data

                var results = new Array();

                //get created time of request

                var timeCreated = request.dateCreated.getTime();

                //get current system date/time, convert to ms

                var curDate = new Date();

                var curTime = curDate.getTime();

                //subtract current system time from VM installed time

                diff = curTime-timeCreated;

                days = diff/86400000;


                //if request is 7 days or less

                if(days <= 7){












                csvFile.write(results + "\n");




              • 4. Re: vRA time to provision parameters
                defmania Novice

                Hey, thanks for the action. Where you able to succcessfully create that workflow to eventually send out the notification email? I'm still hitting a few bumps along to road to creating that.


                Thank you!