VMware Horizon Community
Super6VCA
Expert
Expert
Jump to solution

Removing Old cp-templates, cp-replicas, and cp-parents

We recently switched back to using Linked Clones in most of our pools.  We currently have 3 pools that are Instant Clones but i show about 14 templates, replicas, and parents.  I located which ones are valid and which are not but not sure the correct way to remove them.  Can i go to each host and remove them there is that a bad thing to do.  I seen the maintenance commands but not sure about how to remove them.  Any help is appreciated.  Thanks

Perry

Thank you, Perry
Reply
0 Kudos
1 Solution

Accepted Solutions
sjesse
Leadership
Leadership
Jump to solution

Sorry I forget about that limitation. Yes, I've done it multiple times, but you can't delete them till they are unprotected.

View solution in original post

Reply
0 Kudos
17 Replies
sjesse
Leadership
Leadership
Jump to solution

The utilities are here

Instant-Clone Maintenance Utilities

Are you removing all of the pools? If so just run the unprotect command and deleted all of them, if not you need to isolate which ones are which. If you create a resource pool and push a new image to the pool, the cp- vms will show up in the same locations as the clones. Then you can isolate the correct ones and delete them

You can't delete them though until the command is ran, if you can they are probably orphaned and need to be deleted anyway.

Reply
0 Kudos
Super6VCA
Expert
Expert
Jump to solution

i am not deleting all of them.  I currently have 3 pools of instant clones but i have about 14 parents, replicas and templates showing up invCenter. Just looking to get rid of those 10 stray parent, replicas, and templates.  I think that that the IcUnprotect file will remove them but not sure about a couple things.  Is the instant clone client ID the one that appears in vcenter or is that a different number?  On that same line, is the parent name that shows up? i.e. cp-parent-..............

Thank you, Perry
Reply
0 Kudos
sjesse
Leadership
Leadership
Jump to solution

Unprotect just allows you to manually delete them , normally the option to delete them is grayed out. I have my pools in resource groups like I mentioned before and the names don't tie to that id. Here is an example

pastedImage_0.png

There is one cp-template file that gets cloned to the cp-replica, then the cp-replica is cloned to the cp-parent files, then finally the cp-parents are forked to each clone. I'm personally not aware of a easy way to identify them, other then pushing the ones you need into resource pools, and deleting any of them that don't show up there. You may be able to look in the adsi editor and look ldap database to see where the links there, but so far I've never done that or seen anyone do that yet.

Reply
0 Kudos
BenFB
Virtuoso
Virtuoso
Jump to solution

We've always applied notes to our parents since it will be added to the replica on linked clones for easy identification. Does that not work with instant clones?

BenFB
Virtuoso
Virtuoso
Jump to solution

Super6VCA I'm curious why you are moving from instant clones back to linked clones?

Reply
0 Kudos
Super6VCA
Expert
Expert
Jump to solution

The biggest reason is login time.  In out environment we could not get UEM and Appvol to work well with it and login times were about 40 seconds.  I hated going back.

Thank you, Perry
Reply
0 Kudos
sjesse
Leadership
Leadership
Jump to solution

I just tried this since I never noticed the actions option, it defaults to unprotect. You can run it in detect mode and get something similar to below which may help, as you see  I have a few that i need to clean up, I'll probably verify these, but a quick looks they do like they may have been left over from a push. I'm doing updates in a few weeks again and will run this later and see if it changes since I should get a new set.

pastedImage_0.png

Reply
0 Kudos
Super6VCA
Expert
Expert
Jump to solution

Sjesse,

I only have one resource pool so i am not that lucky.  cheap boss!  So I did identify what needs to be removed.  I was just curious if i was able to go into the Host and right click the item (parent, replica, or template) and delete them from disk.  I have 15 cp-parents, 14 cp-replicas, and 12 cp-templates.  Sounds odd but that's what they are. I have not removed anything at this point.  Can I manually delete them without messing up the DB?

Thank you, Perry
Reply
0 Kudos
sjesse
Leadership
Leadership
Jump to solution

I don't mean a different cluster, I mean a vsphere resource pool

pastedImage_0.png

If you create one and then edit the pool , its in the vsphere settings

pastedImage_1.png

New vms will go in there, but to get the new cp template files there you need to push a new image

IF you have them identified you can delete them and the run the viewdbchk command if you want to verify everyhing is fine

Resolving Database Inconsistencies with the ViewDbChk Command

this does fix instant clone issues, there is a bug 7.4 has that I have to run this from time to time.

Reply
0 Kudos
Super6VCA
Expert
Expert
Jump to solution

Thanks.  My cluster and resource pool are one in the same.  Standard edition 😞 

So they can be delete from disk manually???

Thank you, Perry
Reply
0 Kudos
sjesse
Leadership
Leadership
Jump to solution

Sorry I forget about that limitation. Yes, I've done it multiple times, but you can't delete them till they are unprotected.

Reply
0 Kudos
Super6VCA
Expert
Expert
Jump to solution

sjesse,

Thanks again for all the assistance. Really appreciate the replies.  We are all good now.  Thanks and take care!

Perry

Thank you, Perry
Reply
0 Kudos
ianhlfc1
Contributor
Contributor
Jump to solution

Hey sjesse,

Could you please share the command that uses detect mode as below

We need to get some storage back on our datastores and I cant find the correct syntax

I would be very grateful

Many Thanks

Ian

Reply
0 Kudos
ianhlfc1
Contributor
Contributor
Jump to solution

Hey sjesse,

apologies as below

pastedImage_1.png

Reply
0 Kudos
sjesse
Leadership
Leadership
Jump to solution

When you push out a new image those should get cleaned up, its probably because you deleted or renamed the image those parents were based off of.

Reply
0 Kudos
ianhlfc1
Contributor
Contributor
Jump to solution

Thank  you for replying sjesse.

I think we have lots of old data that has not been removed over a period of 2 years even after deleting the pools

The command that you have run on your earlier post is exactly what I am looking for.

If you could share i would appreciate it

Many Thanks

Ian

Reply
0 Kudos
oliii
Contributor
Contributor
Jump to solution

Hello @sjesse

Can you please provide us the command you used to get this out?

Thanks,

Oliver

Reply
0 Kudos