VMware Cloud Community
Optic_Nerve
Enthusiast
Enthusiast
Jump to solution

Storage Views and Snapshot Space

Hi All,

One of the new features in vSphere is the "Storage Views" tab. Click on an object in vCenter (eg, a cluster) and then click the "Storage Views" tab.

This tab has some useful information on it including the amount of snapshot space that each VM is currently consuming. This is a great way to quickly eyeball a cluster and see which VMs currently have a snapshot.

My question is not a big issue - more a curiosity. When I look at the "Storage Views" tab I can see all the VMs running on that cluster. None of my VMs currently have a snapshot. However, the amount of snapshot space displayed for each VM varies. Same say 1.08 KB, others say 633 B etc. Approximately three quarters of my VMs have a very low value like this (1 KB or less) with the remaining quarter actually showing 0 B.

I would have thought that any VM without a snapshot should be 0 B.

As I said, this is not a big issue - just a curiousity. It is still easy enough to tell which VMs have a real snapshot as you can ignore all the ones with 1 KB or less of snapshot space. I would still expect any VM without a snapshot to show 0 B though and I would consider this to be a (minor) bug.

Does anyone else get these strange numbers?

Cheers,

David

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

Did a little research on our environment and I think I know what you're seeing, we do have some snapshots in our environment but also show some VMs that have no snapshot with 1.08kb displaying on the storage view under snapshot usage, so I assume its getting this information based on some files located in the VM's directory. What I found for one specific VM was there is a filed with an extension called .vmsd which contains meta data about snapshots, also defined on VMwares website: http://www.vmware.com/support/ws5/doc/ws_learning_files_in_a_vm.html

The size of the meta file:

[root@himalaya Quentin]# ls -lha | grep .vmsd
-rw------- 1 root root 1.1K Jul 12 08:18 Quentin.vmsd

This metafile looks like the following (which I do remember creating but via the CLI):

[root@himalaya Quentin]# cat Quentin.vmsd
.encoding = "UTF-8"
snapshot.lastUID = "127"
snapshot.numSnapshots = "0"
snapshot.current = "0"
snapshot0.uid = "127"
snapshot0.filename = "Quentin-Snapshot127.vmsn"
snapshot0.displayName = "BackupShot"
snapshot0.description = "Snapshot for Backups"
snapshot0.createTimeHigh = "290435"
snapshot0.createTimeLow = "-1325916361"
snapshot0.numDisks = "1"
snapshot0.disk0.fileName = "Quentin.vmdk"
snapshot0.disk0.node = "scsi0:0"

snapshot.needConsolidate = "FALSE"

snapshot1.uid = "101"
snapshot1.filename = "Quentin-Snapshot101.vmsn"
snapshot1.parent = "100"
snapshot1.displayName = "Snapshot-2-8:45"
snapshot1.description = "8:45am snapshot"
snapshot1.createTimeHigh = "287640"
snapshot1.createTimeLow = "-1172553953"
snapshot1.numDisks = "2"
snapshot1.disk0.fileName = "Quentin-000001.vmdk"
snapshot1.disk0.node = "scsi0:0"

snapshot0.type = "0"

snapshot1.type = "1"

snapshot0.disk1.fileName = "/vmfs/volumes/48e91a93-a0a8d3bf-f831-003048670887/Quentin/Quentin.vmdk"
snapshot0.disk1.node = "scsi0:1"

snapshot1.disk1.fileName = "Quentin-000002.vmdk"
snapshot1.disk1.node = "scsi0:1"

I've also look at other VMs that do have snapshots and the size is more appropriately matched up with he actual snapshot deltas, though the VMs without snapshots the size of the .vmsd seems to match up with what is being shown in the storage view and as you noted, these VMs do not have snapshots. I believe if a VM had snapshots at one point and had some type of consolidation/deletion, the .vmsd may not have been cleaned up and is then use as a point of reference as 'thinking it has snapshots' and uses the file size of the .vmsd.

This hypothesis was pretty easy to test, what I did was delete Quentin.vmsd (the VM was powered off, may want to be careful when its online) and what you need to do, is not update the storage view, but go to the VM's summary and do a refresh on the storage usage. This will refresh the specific datastore on which this VMs lives on and if you go back to the storage view and do a refresh/update, you'll notice the size of the snapshot goes to 0bytes now, which is the expectation.

So I think this explains whats going on, maybe a quirk or expected behavior. Again, I agree you should just watch out for delta usage < 1gb for real snapshots or you can always go in and clean up the .vmsd files manually.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
2 Replies
lamw
Community Manager
Community Manager
Jump to solution

Did a little research on our environment and I think I know what you're seeing, we do have some snapshots in our environment but also show some VMs that have no snapshot with 1.08kb displaying on the storage view under snapshot usage, so I assume its getting this information based on some files located in the VM's directory. What I found for one specific VM was there is a filed with an extension called .vmsd which contains meta data about snapshots, also defined on VMwares website: http://www.vmware.com/support/ws5/doc/ws_learning_files_in_a_vm.html

The size of the meta file:

[root@himalaya Quentin]# ls -lha | grep .vmsd
-rw------- 1 root root 1.1K Jul 12 08:18 Quentin.vmsd

This metafile looks like the following (which I do remember creating but via the CLI):

[root@himalaya Quentin]# cat Quentin.vmsd
.encoding = "UTF-8"
snapshot.lastUID = "127"
snapshot.numSnapshots = "0"
snapshot.current = "0"
snapshot0.uid = "127"
snapshot0.filename = "Quentin-Snapshot127.vmsn"
snapshot0.displayName = "BackupShot"
snapshot0.description = "Snapshot for Backups"
snapshot0.createTimeHigh = "290435"
snapshot0.createTimeLow = "-1325916361"
snapshot0.numDisks = "1"
snapshot0.disk0.fileName = "Quentin.vmdk"
snapshot0.disk0.node = "scsi0:0"

snapshot.needConsolidate = "FALSE"

snapshot1.uid = "101"
snapshot1.filename = "Quentin-Snapshot101.vmsn"
snapshot1.parent = "100"
snapshot1.displayName = "Snapshot-2-8:45"
snapshot1.description = "8:45am snapshot"
snapshot1.createTimeHigh = "287640"
snapshot1.createTimeLow = "-1172553953"
snapshot1.numDisks = "2"
snapshot1.disk0.fileName = "Quentin-000001.vmdk"
snapshot1.disk0.node = "scsi0:0"

snapshot0.type = "0"

snapshot1.type = "1"

snapshot0.disk1.fileName = "/vmfs/volumes/48e91a93-a0a8d3bf-f831-003048670887/Quentin/Quentin.vmdk"
snapshot0.disk1.node = "scsi0:1"

snapshot1.disk1.fileName = "Quentin-000002.vmdk"
snapshot1.disk1.node = "scsi0:1"

I've also look at other VMs that do have snapshots and the size is more appropriately matched up with he actual snapshot deltas, though the VMs without snapshots the size of the .vmsd seems to match up with what is being shown in the storage view and as you noted, these VMs do not have snapshots. I believe if a VM had snapshots at one point and had some type of consolidation/deletion, the .vmsd may not have been cleaned up and is then use as a point of reference as 'thinking it has snapshots' and uses the file size of the .vmsd.

This hypothesis was pretty easy to test, what I did was delete Quentin.vmsd (the VM was powered off, may want to be careful when its online) and what you need to do, is not update the storage view, but go to the VM's summary and do a refresh on the storage usage. This will refresh the specific datastore on which this VMs lives on and if you go back to the storage view and do a refresh/update, you'll notice the size of the snapshot goes to 0bytes now, which is the expectation.

So I think this explains whats going on, maybe a quirk or expected behavior. Again, I agree you should just watch out for delta usage < 1gb for real snapshots or you can always go in and clean up the .vmsd files manually.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
Optic_Nerve
Enthusiast
Enthusiast
Jump to solution

Hi William,

Great reply - thanks! As you correctly pointed out, each one of the VMs that was showing a strange amount of snapshot space (less than 1 KB) had a non-empty .vmsd file. These .vmsd files had information in them about old snapshots that were long gone. I am guessing that an earlier version of VMware had a bug which didn't clean out these files properly after deleting a snapshot.

I have removed all of these orphaned .vmsd files (when the VM is next powered on it creates an empty .vmsd file to replace it). After doing this the "Storage Views" tab now shows all my VMs to have 0 bytes used in snapshot space.

Thanks again - great detective work. Smiley Happy

Cheers,

David

0 Kudos