2 Replies Latest reply on Jul 28, 2016 6:13 PM by Schorschi

    Remove build image, i.e. stale VIBs, no longer referenced, in Auto Deploy cache?

    Schorschi Expert

      Remove build image, i.e. stale VIBs, no longer referenced, in Auto Deploy cache?


      Adding build images (profiles) to the Auto Deploy cache is straight forward, add a rule that references a given image profile in the depot, and boom... the image profile components (VIBs) are uploaded to the Auto Deploy cache.  Removing an image profile would seem to be easy as well, delete all rules that reference the image profile, done.  But the reality is, the image profile components (VIBs) even if no longer referenced by any existing rule, never seem to be purged from the Auto Deploy cache?  Even if all rules are deleted, so all image profiles retired, the cache is still populated with the image profile components (VIBs)? There does not seem to be any official process to remove unused components (VIBs) from the Auto Deploy cache?  Short of zeroing out the cache intrusively, for example, delete the entire cache contents, and let the Auto Deploy service re-establish an empty database?  Then re-establish the image profiles that are desired?  That does not seem to make sense?  So the best way to purge the cache is to do something really ugly?  See below.


      To purge Auto Deploy cache of VIBs no longer referenced by any rule, any image profile:

      1) Capture all current rules (via PowerCLI script)

      2) Capture list of all image profiles desired (from somewhere, since depot cannot be establish from Auto Deploy cache content, so original depot files has to be archived/stored for future use)

      3) Stop the Auto Deploy service

      4) Delete the cache folder contents

      5) Start the Auto Deploy service (per VMware documentation, this creates an empty database)

      6) Re-establish image profiles, i.e. depot (via PowerCLI script)

      7) Re-establish all previous rules (via PowerCLI script)

      8) Result is that Auto Deploy cache is compressed, optimized, orphaned VIBs are gone


      The above seems to be a horrible, anything but straight forward way to compress, remove, the stale elements in the Auto Deploy cache.  Hope someone has figured out a better method?