VMware Cloud Community
bluegene
Contributor
Contributor

How to Schedule Snapshot Delete

I'm currently using VMWare Infrastructure Client to manage couple of VMs sitting on VMWare ESX server. I don't have access to service console. Can anybody suggest a way to schedule snapshot delete though the infrastructure client? As mentioned ago, I don't have access to service console.

0 Kudos
6 Replies
depping
Leadership
Leadership

You could create a simple powershell script and schedule it via the windows task scheduler

Do you want to do this for a specific VM or for all VMs?

Duncan

VMware Communities User Moderator | VCP | VCDX

-


Blogging: http://www.yellow-bricks.com

Twitter:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
bluegene
Contributor
Contributor

Thanks Duncan. I just want to clarify when I said "delete", I meant merging VMWare snapshot delta file into original vmdk file. I'm surprised by your answer that a powershell script can delete the snapshot. Can you provide more info on that please? Also I'm looking for an OS agnostic way to do it but I welcome all possible solutions.

0 Kudos
depping
Leadership
Leadership

Powershell can be run and scheduled from the vCenter Server. I have two links for you that explain how to do this with powershell:

http://virtualfuture.info/2008/07/remove-snapshots-script/

or you could probably do:

Get-Vm | Get-Snapshot | Remove-Snapshot

Duncan

VMware Communities User Moderator | VCP | VCDX

-


Blogging: http://www.yellow-bricks.com

Twitter:

If you find this information useful, please award points for "correct" or "helpful".

Myftiu67
Contributor
Contributor

Hi Dunkan,

I have just started looking after vmware infrastructure. Recently upgraded to 4.1 version.

I would like to schedule a vmware snapshot delete for a specific server.

Can you help on this in more details?

Regards Dritani

0 Kudos
Myftiu67
Contributor
Contributor

Hi Duncan,


More details:

I would like to keep last week snapshots and delete the older one...

Thanks
Dritani

0 Kudos
Dritani
Contributor
Contributor

Hi Duncan,

Thanks for your reply.

I know has been a long time, but still needed.

I want to do it for specific, machine.

...and I am vere bad in scripting...


can you help?

Regards
Dritani

0 Kudos