5 Replies Latest reply on Jan 10, 2018 1:38 PM by LucD

    Querying SRM License Information Returns Stale Data

    jacosta Lurker

      (Actual LicenseKey, Total, and Used values were changed)  Recently I reclaimed 13 SRM licenses.  Previously there were only 7 free licenses.  Within the GUI, it correctly reflects that there are now 20 free licenses, in the form of 600 Total and 580 Used.  So the product seems to be function correctly.

      However, using the below snippet of code,

                        Process
                        {
                              $srvins = Get-View ServiceInstance -Server $global:DefaultVIServer
                              $licmgr = Get-View -Id $srvins.Content.LicenseManager
                              $licmgr.Licenses
                        }

      nets the old information:

      LicenseKey : xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
      EditionKey : srm.enterprise.vm
      Name       : vCenter Site Recovery Manager Enterprise
      Total      : 600
      Used       : 593
      CostUnit   : vm
      Properties : {LicenseInfo, ProductName, ProductVersion, FileVersion...}
      Labels     :

      I used a new PowerCLI session, added some UpdateView lines as below, but netted the same results as above

                        Process
                        {
                             $srvins = Get-View ServiceInstance -Server $global:DefaultVIServer
                             $srvins.UpdateViewData()
                             $licmgr = Get-View -Id $srvins.Content.LicenseManager
                             $licmgr.UpdateViewData()
                             $licmgr.Licenses
                        }

      I'm guessing I could restart the vmware-license service to "fix" the problem for now, but would like to understand why the code above is failing.  Should I use another approach?  Known issue? Or....?

      Thanks

      JoeA

      POWERCLI Version: 6.5.2.6234650

      Vcenter Version: 6.0.0, Build 4541947

      SRM Version: 6.1.1, Build 4535903