alex777
Contributor
Contributor

How to remove all snapshots on ESX host ?

Jump to solution

Hello.

Prompt please how from cli(ssh) to remove all snapsots on all VMs (ESX 3x) ?

0 Kudos
1 Solution

Accepted Solutions
kjb007
Immortal
Immortal

You can run a vmware-cmd against the vm's and remove them using a loop.

cd /vmfs/volumes/<datastore_name>

for $vm in `ls -1`

do

vmware-cmd /vmfs/volumes/<datastore_name>/$vm/$vm.vmx removesnapshots

done

Message was edited by: kjb007 : fixed code

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

View solution in original post

0 Kudos
4 Replies
alex777
Contributor
Contributor

Thanks for your answer.

But PoweShell does not approach. Only local ESX console (this script run by cron).

0 Kudos
kjb007
Immortal
Immortal

You can run a vmware-cmd against the vm's and remove them using a loop.

cd /vmfs/volumes/<datastore_name>

for $vm in `ls -1`

do

vmware-cmd /vmfs/volumes/<datastore_name>/$vm/$vm.vmx removesnapshots

done

Message was edited by: kjb007 : fixed code

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

View solution in original post

0 Kudos
alex777
Contributor
Contributor

Thanks !

0 Kudos