I’ve found a few situations in which snapshots get stuck, like glue, to a running VM, and despite your best effort to delete them, they wont go away. Like in-laws, they stick around, a bit longer than is pleasant.
If a snapshot has not been removed cleanly on the first try, you may want to create a new snapshot first (just to make sure the system knows there IS a snapshot present) before using the methods below.
Here are a few ways of getting rid of the ones that don’t want to go away:
From the Service Console (ESX)
[root@esx esx:storage1]# vmware-cmd ./VMname/VMname.vmx removesnapshots
removesnapshots() = 1
From PowerShell
PS C:\> get-vm VMname* | get-snapshot | Remove-Snapshot -Confirm:$false
Using the rCLI
C:\Program Files\VMware\VMware VI Remote CLI\bin>vmware-cmd.pl -H esx -U root –P password /vmfs/volumes/esx:storage1/VMname/VMname.vmx removesnapshots
removesnapshot () = 1
Using the Perl Toolkit
This brought to us by Andrew, an avid Perl Toolkit user:
./snapshotmanager.pl –server your.vc.host –operation removeall –vmname some.bad.vm
Warning, depending on the size of the snapshot, it may take a LONG while for them to go away! You can get an idea of how long it’s going to take by looking at how large the snapshots are with ls -lh and note the size of your largest snapshots. They bigger than a few deciGig (for those who don’t get it, that’s a few tens of Gigs, 10G-20G)? Shame on you.
Cody,
If you have the Perl Toolkit installed, you can also use “snapshotmanager.pl”…
./snapshotmanager.pl –server your.vc.host –operation removeall –vmname some.bad.vm
http://www.vmware.com/support/developer/viperlt…
Andrew
Thanks for that Andrew, post updated to reflect this as well. Now I need to
pickup perl and add it to the arsenal as well… WEE!
Some good points raised in that post. Will be back to check for more.
Hey there, thanks for the information on this, you have been a great source for me, I am really very happy to have you in the list of bookmarks I have!
Debra
Hey. No problem. Thank you!
Nice one. I have stumbled and twittered this for my friends. Hope others find it as interesting as I did.
Great post, what you said is really helpful to me. I can't agree with you anymore. I have been talking with my friend about, he though it is really interesting as well. Keep up with your good work, I would come back to you.
Same here. It has definitely eased my mind on the bugging problem of stuck snapshots!
No worries. Thanks!
please change the back ground its really hard to read
Awesome! Thanks for sharing!
Thanks for that!
Some snapshots made my host ran out of space. However, with the bat you gave, the problem was resolved. Thank you for a bat. LoL.
No problem!
Nice..too technical for me…I am having some problem…I will ask my friend to take a look at this..
Nice..too technical for me…I am having some problem…I will ask my friend to take a look at this..
nice i love reading it…, you have been a great source for me, I am really very happy to have you in the list of bookmarks I have!
nice i love reading it…, you have been a great source for me, I am really very happy to have you in the list of bookmarks I have!
I have not problem with that.
very good.
You know those are just spam replies right…..
I do now. Thanks for the heads up.
great News
Thanks for that Andrew, post.
http://pinterest.com/source/movieleatherjacket.com/