PowerCLI

 View Only

  • 1.  Help!! automated clone VM & delete old cloned VM

    Posted May 20, 2009 05:52 PM

    We need automated "clone and delete old VM" process for specific VM.

    For automated VM cloning, I found out "Task job on vCenter".

    vCenter's Task job offer daily cloning.

    But to success daily cloning, it need deleting cloned VM daily maullay.

    vCenter dosn't offer deleting VM task.

    I found out that VI toolkit "remove-vm -deletefromdisk" offer delete VM operation without VI Client.

    But I don't know power-shell nothing.

    Moreover "remove-vm" command need confirmnation.

    How can I do it?



  • 2.  RE: Help!! automated clone VM & delete old cloned VM

    Posted May 20, 2009 08:49 PM

    You can auto confirm the actions by explicitly setting confirm to $false. Be careful that you have the correct VM objects when doing this.

    Remove-VM -confirm:$false



  • 3.  RE: Help!! automated clone VM & delete old cloned VM

    Posted May 21, 2009 02:14 AM

    Thanks, ewannema

    "Remove-VM -deletefromdisk -VM vmanme -confirm:$false" works.

    But still I don't know how to make automated schdule job with power-shell script.

    I trying to make a script and enroll it to schedule job.



  • 4.  RE: Help!! automated clone VM & delete old cloned VM

    Posted May 21, 2009 05:22 AM

    Thanks, ewannema.

    Finally I cleared automation issue.

    Thanks.



  • 5.  RE: Help!! automated clone VM & delete old cloned VM

    Posted Apr 23, 2014 10:39 AM

    Hi Patton,

    Can you provide me the complete script that will create a clone and delete it once a fresh clone is taken?? Appreciate your help in advance!!!

    Cheers,

    M