VMware Cloud Community
rocker77
Enthusiast
Enthusiast

How can I create snapshot on VM and set automatic delete after 8hours?

Hello,

do you know how can I create snapshot on VM and set automatic delete after 8hours? I can do it via Update Manager during patching and I'd like use this feature with PowersCLI. I have tried look for any info about it, unfortunately I was unsuccessful. I don't want create two different scripts with create/delete snapshot.

Thanks, Roman.

0 Kudos
5 Replies
LucD
Leadership
Leadership

That snapshot delete is, and this is an educated guess, done by the Update Manager itself.

Stop the Update Mgr service and you'll notice the snapshot won't be removed.

____________

Blog: LucD notes

Twitter: lucd22


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

KevH
Contributor
Contributor

Roc.ker,

I don’t know of any way of doing this without update manager. One workaround you can do using update manager is select a baseline that is already compliant, click remediate and you can move through the dialogues and use the snapshot expiration. It can be performed without installing any patches. I hope they add that feature to scheduled task in the future.

0 Kudos
sysxperts
Enthusiast
Enthusiast

write a powershell script and run as scheduled task, see http://get-admin.com/blog/?p=704 and check out Alan Renouf site for info on running PS as scheduled task.

Paul Valentino - VCP, EMCCA - @sysxperts @vcommunitytrust - Help the vCommunity one certification at a time! http://www.vcommunitytrust.org/ http://igg.me/p/212476?a=1091980
nnedev
VMware Employee
VMware Employee

Hi roc.ker,

Here are some useful links containing information about task scheduling:

1. Script that schedules itself - http://blogs.msdn.com/b/mwilbur/archive/2007/02/23/powershell-script-that-can-schedule-itself-to-run...

2. Schtasks.exe help - http://msdn.microsoft.com/en-us/library/bb736357%28VS.85%29.aspx

Let us know if you need help with something else.

Regards,

Nedko Nedev

PowerCLI Development Team

Regards, Nedko Nedev PowerCLI Development Team
0 Kudos
rocker77
Enthusiast
Enthusiast

Hello all,

thanks for your helpful suggestions.

0 Kudos