Automation

 View Only
  • 1.  Check if a VM Guest was created from a Template or a clone

    Posted Oct 12, 2010 11:05 AM

    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



  • 2.  RE: Check if a VM Guest was created from a Template or a clone

    Posted Oct 12, 2010 12:35 PM

    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



  • 3.  RE: Check if a VM Guest was created from a Template or a clone

    Posted Oct 12, 2010 02:49 PM

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