VMware Cloud Community
Wannabeswede
Contributor
Contributor
Jump to solution

Finding Snapshots

Bear with me on this quesiton.

In the ESX 2.53 days I used to run a command to search for all REDO files to see if we had any Guest in REDO mode that we didn't know about. The command was:

ll s/.REDO (this was done from the /vmfs dir)

We know have some 3.01 hosts and I want to do the same thing, obviously I'm not looking for REDO files I'm now looking for Snapshots. So I tried the following command:

ll s/delta* (from the /vmfs/volumes dir)

And it doesn't work, "no such dir". I also tried the following:

ll s/.vmx

ll s/.vmdk

ll s/

Only the "ll s/" worked, everything else gave the same "no such" error.

Anyone have any ideas? Or a more elegant way to look for random guests that are in SnapShot mode from the 100 that you have?

0 Kudos
1 Solution

Accepted Solutions
esiebert7625
Immortal
Immortal
Jump to solution

Here's some info....

Finding snapshots - http://www.vmware.com/community/thread.jspa?messageID=597517

You can do: ll -R | grep "vmsn" OR find -iname "*-delta.vmdk"

How can I find vmdk files that are orphaned from VM’s and old snapshot files.

• Login to service console

• Change to your /vmfs/volumes/ directory

• Type find -iname "*-flat.vmdk" -mtime +7 -ls to find –flat vmdk files that have not been modified in 7 days

• Type find -iname "*-delta.vmdk" -mtime +7 -ls to find snapshot files that have not been modified in 7 days

fyi...if you find this post helpful, please award points using the Helpful/Correct buttons...thanks

View solution in original post

0 Kudos
7 Replies
esiebert7625
Immortal
Immortal
Jump to solution

Here's some info....

Finding snapshots - http://www.vmware.com/community/thread.jspa?messageID=597517

You can do: ll -R | grep "vmsn" OR find -iname "*-delta.vmdk"

How can I find vmdk files that are orphaned from VM’s and old snapshot files.

• Login to service console

• Change to your /vmfs/volumes/ directory

• Type find -iname "*-flat.vmdk" -mtime +7 -ls to find –flat vmdk files that have not been modified in 7 days

• Type find -iname "*-delta.vmdk" -mtime +7 -ls to find snapshot files that have not been modified in 7 days

fyi...if you find this post helpful, please award points using the Helpful/Correct buttons...thanks

0 Kudos
Wannabeswede
Contributor
Contributor
Jump to solution

Thanks for the info, as to your "find -iname +7" command, I actually called Vmware because some of our guests have .vmdk files that have time and date stamps that are days to weeks old. and these are Guests that are live and being used.

Weird, in 2.53 .dsk or .vmdk files that had Powered up Guests always had the time and date stamps that were within the last couple of minutes.

Anyway, thanks for the help

0 Kudos
Wannabeswede
Contributor
Contributor
Jump to solution

Tried the answer supplied and the issue is that it doesn't show me the friendly SAN name as before. Sorry to be nitpicky

0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

I don't think there is any way to get it to show the SAN friendly name using the find command because it is a symbolic link and not the actual directory name. VirtualCenter reads the friendly name of the datastore but the OS uses the actual name.

0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

Actually -follow will return friendly name since it causes find to follow symbolic links, unfortunately it also returns more and duplicate info.

0 Kudos
william450
Contributor
Contributor
Jump to solution

is there a script that can do the same for me?

0 Kudos
petedr
Virtuoso
Virtuoso
Jump to solution

We have a free ulility called snaphunter that you can try.

http://www.phdvirtual.com/utilities/snaphunter.php

Pete@PHD Virtual

www.phdvirtual.com, makers of PHD Virtual Backup for Vmware and Xen Server, formally esXpress

www.thevirtualheadline.com www.liquidwarelabs.com
0 Kudos