Each stemcell is uniquely identified by its name and version.
You can identify stemcell version from inside the VM via following files:
Note: Release authors should not use the contents of these files in their releases.
See Stemcell Building to find stemcell archive structure.
Occasionally stemcells are deleted from the IaaS outside of the Director. For example your vSphere administrator decided to clean up your vSphere VMs folder. The Director of course will continue to reference deleted IaaS asset and CPI will eventually raise an error when trying to create new VM.
bosh upload stemcell command provides a
--fix flag which allows to reupload stemcell with the same name and version into the Director fixing this problem.
Over time the Director accumulates stemcells. Stemcells could be deleted manually via
bosh delete stemcell command or be cleaned up via
bosh cleanup command.