VMware Horizon Community
Super6VCA
Expert
Expert

CP-Template location

I need to do datastore maintenance and have an issue with a cp-template associated with an instant clone.  I need to remove the datastore and was curious if that cp-template folder (in that datastore) can be manually moved to another datastore without causing issues.  I prefer not to remove the pool.  Was curious if anyone has an idea how to get rid of this cp-template.  I understand this is a pretty vague question so if there are any questions i will answer the best i can.  Thanks

Thank you, Perry
0 Kudos
6 Replies
nburton935
Hot Shot
Hot Shot

Those folders are VMs and Templates folders and are associated with the vCenter inventory, not the datastore. Only the template VM is associated with the datastore.

Do you already have other datastores associated with that pool? If so, try to de-select the old datastore in the pool settings > vCenter settings > Datastores. You'll then likely need to re-push your image/snapshot, which will copy a new template to another datastore that is checked. Once ALL instant clones are on the new image and the task tab is down to 0, the old templates/replicas/parents will automatically delete themselves. 

That's the cleanest way to do it without deleting the entire pool. 

0 Kudos
Super6VCA
Expert
Expert

i totally get what you are saying but here is more confusion.  I have two datastores selected in my pool (see attachment) and neither is the datastore that i need to remove this from.  The files that i look at on the DS are todays date so they are current.  When i look at the log file i can see what snapshot it's using and that is how i know what pool it is.  But it is not one of the two DS's that are in my settings.  Any I only have one LC pool.   Any thoughts??  Thanks for the quick reply

 

Super6VCA_0-1605042734715.png

 

Thank you, Perry
0 Kudos
sjesse
Leadership
Leadership

If this is production, I'd open a ticket, they can go through the ansi database to confirm but its possible the vms are orphaned and just needs to be removed. I've seen that quite a bit. You can try

 

https://docs.vmware.com/en/VMware-Horizon-7/7.3/horizon-virtual-desktops/GUID-6025D684-2E05-4857-9C2...

 

the icunprotect commands to see if the detect command helps give you an idea, but it hasn't been 100% for me.

0 Kudos
nburton935
Hot Shot
Hot Shot

In addition to what sjesse said, 7.10 also introduced a new tool called iccleanup.cmd that is WAY easier to use, and also gives a tree of which templates, replicas, and parents are utilized from which golden image and which snapshot.

Screen Shot 2020-11-11 at 7.32.20 AM.png

If that is not an option (not on 7.10) and you are sure that is the template you are using for that pool, you could take a new snapshot to ensure a new clone tree gets created, take down the datastore with existing template, and push the new snapshot. That will guarantee that the new template will not get created on the datastore. Once all push image tasks get to 0 on the pool and all instant clones are on the new image, Horizon should automatically delete the old templates, replicas, and parents. 

0 Kudos
Super6VCA
Expert
Expert

I am running version 7.7 and that utility doesn't show up for me.  I only have icmaint and icunprotect in the bin folder.  I only have one IC pool and it comes from that master image and the files that i can see are current with today's date so i can only assume it the same pool 

Thank you, Perry
0 Kudos
nburton935
Hot Shot
Hot Shot

In that case, I would proceed with the process I described with the re-push. Ensure you take a new snapshot as part of the process or it will just use the same template again. 

0 Kudos