Search for VM Snapshots from the Service Console
There are several ways to determine if you have virtual machines with snapshots. Why you would want to know has been covered In various other posts both here at VM /ETC as well as on the other virtualization blogs. It’s so important that the virtualization community has created different tools and scripts to identify and monitor snapshot files for administrators. So, when I read the post WWoIT - Wayne’s World of IT: Find VM snapshots in ESX/VC I had an experience that Aaron Delp described as “/HEADDESK” (when he commented on my uploading files with the VI Client post).
It may not be the fanciest of methods, but probably the quickest way to find VM snapshots is to use the ls command from the ESX Service Console. By piping the output with grep to find files with the snapshot extension, .vmsn, and using the recursive switch you can scan all the VMFS LUNs visible to an ESX host. That’s so simple it hurts!
To use the ls command to find snapshots do the following:
- Log in to the service console (use putty or mRemote for remote log in)
- Query for the snap shot files in the VMFS volumes
#ls -Ral /vmfs/volumes/* |grep .vmsn
Click the screen shot for a larger image.
Check out the whole Wayne’s World of IT post linked above for 3 other methods of finding snap shots.
Technorati Tags: virtualization, vmware, esx
Related Posts
Tags: esx, how to, scripts, serviceconsole, snapshots, virtualmachine, vmware





June 25th, 2008 at 4:55 pm
i’ll usually just use the following:
find /vmfs/volumes -iname “*delta.vmdk”
this way even if a snapshot has gone completely haywire you will find the delta files and know something is wrong.
And i just wrote a piece about snapshots yesterday:
http://www.yellow-bricks.com/2008/06/23/deleting-snapshots-when-everything-else-failse/
June 25th, 2008 at 10:01 pm
theres a nice cron script called snap_hunter out there (perl?) but requires net::smtp - easy enough thanks to dags rhel3 rpms!
June 26th, 2008 at 3:12 am
Use the free snaphunter from xtravirt.com.
You will love it!
http://tinyurl.com/6ddwf5
June 26th, 2008 at 5:15 am
Jamie, Sascha,
I am aware of snaphunter and definitely recommend using it for scheduled, automated monitoring and smtp alerting of snapshots. However, as a consultant there’s a lot of times that I can’t install or configure the ESX hosts and that’s when using the command line is handy. I’m sure there are times when a quick command at the Service Console will benefit administrators too!
June 26th, 2008 at 5:20 am
Duncan,
I always forget about the find command. Thanks!
June 26th, 2008 at 11:53 pm
Nice! Always good to know other ways in looking for snapshots via commandline.
I like to use this command:
find ./ -name *delta.vmdk
Grabs all/any residing in /vmfs/volumes
July 5th, 2008 at 10:59 pm
[...] of VM /ETC shares with us a “Doh!” moment he had when he saw this simple method for identifying VMs with snapshots. Sometimes it’s the simplest solutions that evade us the longest. Here’s what I want to [...]