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:

  1. Log in to the service console (use putty or mRemote for remote log in)
  2. 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: , ,

Related Posts

Tags: , , , , , ,

7 Responses to “Search for VM Snapshots from the Service Console”

  1. Duncan Says:

    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/

  2. jamie Says:

    theres a nice cron script called snap_hunter out there (perl?) but requires net::smtp - easy enough thanks to dags rhel3 rpms! :)

  3. Sascha Says:

    Use the free snaphunter from xtravirt.com.
    You will love it!
    http://tinyurl.com/6ddwf5

  4. Rich Says:

    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!

  5. Rich Says:

    Duncan,

    I always forget about the find command. Thanks!

  6. Evan Ramos Says:

    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

  7. Virtualization Short Take #12 - blog.scottlowe.org - The weblog of an IT pro specializing in virtualization, storage, and servers Says:

    [...] 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 [...]

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Subscribe



Add to Google Reader or Homepage
Subscribe in NewsGator Online
Add to netvibes
Add to Plusmo

Advertisements
INSANE

Support VM /ETC! Virtually Insane

Use the new INSANE page for general comments and questions.
UserOnline