template delete recursive operation of templates instantiated as persistent does not remove images from the vcenter datastores
Author Name: Jaime Melis (@jmelis) Original Redmine Issue: 5414, https://dev.opennebula.org/issues/5414 Original Date: 2017-09-28
Steps to reproduce:
- Instantiate a template (template0) as persistent
- Teminate the vm
- A new template (template1) is created, with a copy of the images from template0
- Note the IMAGE/SOURCE of these new images
- Delete template0 with --recursive option
- The images have disappeared from opennebula, but they still exist in vCenter (in the IMAGE/SOURCE path)
The problem is due to the fact that the images have the tag TEMPLATE/VCENTER_IMPORTED = "YES", and datastore/vcenter/rm does not operate on them.
I believe that this problem is the same reported in this post. I have describe how to reproduce it
https://forum.opennebula.org/t/delete-image-vmdk-and-folder-wild-vms/6128
VCENTER_IMPORTED is used to avoid rm operation on TM delete, this attribute shouldn't be copied in a clone operation (persistency) at core level.
should be solved in this issue #1762