VMware Cloud Community
Kevin_Hamilton
Contributor
Contributor

Check if a VM Guest was created from a Template or a clone

Not sure if this is the right place for the question.

Is there a way of checking a VM guest to see whether it was created from a Clone of another machine or deployed from a template. If there is I was thinking maybe a powershell script that could pull the details back.

Cheers

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership

This is definitely the right place.

I think this should be possible with the Get-VIEvent cmdlet.

It's a matter of how long you keep the vCenter events (the default is forever).

In that case it would be a matter of filtering out the VmClonedEvent events and the VmDeployedEvent events.

Based on those a script should be able to determine how a guest came to be.

Have a look at some of my Event post. They show the principle.

This looks like a useful script, let me get back to you

____________

Blog: LucD notes

Twitter: lucd22


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Kevin_Hamilton
Contributor
Contributor

Thanks Luc, appreciate the help as always. Will have a look through your posts see if anything jumps out that I can use.

Reply
0 Kudos