NJKwork
Enthusiast
Enthusiast

Scheduled task to delete a VM (clone)

Jump to solution

Hi,

I am trying to use the new hot cloning feature of 2.5 U2 as a poor mans DR solution. I have a NFS volume to store clones and would like to use scheduled tasks to weekly create a clone of some live, important VMs. The problem is, if the clone already exists, it will not let me overwrite it...I have to delete it first. I don't want to use a different name, because then I will fill up my NFS volume; I only want one clone of a VM at any one time.

I looked to see if there were any pre-built scheduled tasks to delete a VM, but there are none. Does anyone know a way to make this happen?

Thanks

SB

0 Kudos
1 Solution

Accepted Solutions
kjb007
Immortal
Immortal

You can use powershell vi toolkit to remove a vm. You can put that into a script and use it to delete the clone.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB

View solution in original post

0 Kudos
4 Replies
Kahonu84
Hot Shot
Hot Shot

Aloha - Why not use a CRON job??

kjb007
Immortal
Immortal

You can use powershell vi toolkit to remove a vm. You can put that into a script and use it to delete the clone.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
NJKwork
Enthusiast
Enthusiast

Cool - thanks for the reply. I actually saw that option too shortly after posting this question. I will give it a shot.

SB

0 Kudos
AESamaureira
Contributor
Contributor

Hi! Could you share the script you created to use as an example? I need to do the same in my infrastructure

Please!

0 Kudos