VMware Cloud Community
vwmagic
Enthusiast
Enthusiast
Jump to solution

With VSphere 6.5, delta.vmdk files as shown in previous versions are gone, How do I pull out such files now?

There used to be delta vmdk files with suffix of "*delta.vmdk", and also with icon as shown below:

pastedImage_0.png

However, with 6.5 version, though the icon for the file is still the same, the suffix "delta.vmdk" is gone, with only *.vmdk" instead.

I have a script: IF (!$strFilename.Contains("delta.vmdk")), now it cannot pull out such deltas any more.

1.   How can I pull out these deltas now?

2.  What attribute can I use to display the size of such files?

Thanks for your help in advance!

Reply
0 Kudos
1 Solution

Accepted Solutions
daphnissov
Immortal
Immortal
Jump to solution

How come then we have a lot of <VM_NAME>_1-000001.vmdk, but so far I have seen none of  <VM_NAME>_1-000001-[delta|sesparse].vmdk??

Because, as I've said, the disk extent data is masked from the GUI perspectives. Get SSH or ESXi shell access to one of your hosts. cd into the working directory for a VM with at least one snapshot. Run a ls -lh command in the directory and you'll see all the files.

View solution in original post

Reply
0 Kudos
21 Replies
daphnissov
Immortal
Immortal
Jump to solution

The discrepancy lies not with vSphere 6.5 but with the filesystem on which snapshots exist. In VMFS-6, the default snapshot was changed from vmfsSparse to seSparse. As a result, the file names of the snapshot extents also changed. On VMFS-6 the snapshots extents are called <VM_Name>-000001-sesparse.vmdk while on VMFS-5 they were named <VM_Name>-000001-delta.vmdk. So in your code, add an OR condition so it can detect snapshots on both types of VMFS datastores.

Reply
0 Kudos
vwmagic
Enthusiast
Enthusiast
Jump to solution

Thanks!!!

Are all these .vmdk Snapshot extends?

What is the difference between Snapshots and Snapshots Extents?

Which suffix indicates virtual  disks?

I thought vmdk is real disks...

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

For every virtual disk there are two files: *.vmdk and *-flat.vmdk. The *.vmdk file is only a disk descriptor file which is just metadata that describes the virtual disk geometry and other attributes. The *-flat.vmdk is the disk extent, the data proper, where the actual bits are stored. For snapshots it is the same thing except with the file names I mentioned previously.

Reply
0 Kudos
vwmagic
Enthusiast
Enthusiast
Jump to solution

PLEASE tell me in following files, what are those representing virtual disks, and what are those representing snapshot extents?

they all have the same icon:

pastedImage_0.png

<VM_NAME>_1-000001.vmdk

<VM_NAME>_1-000002.vmdk

<VM_NAME>_1.vmdk

<VM_NAME>_3-000001.vmdk

<VM_NAME>_3-000002.vmdk

<VM_NAME>_3.vmdk

In addition, I have checked a lot of VM's here, there are no <VM_NAME>.-flat.vmdk at all. Why?

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

what are those representing virtual disks, and what are those representing snapshot extents?

they all have the same icon:

It's impossible to tell without looking at more details, but *generally* the files that have 000001, 000002, etc are snapshots. The ones that do not are base disks.

In addition, I have checked a lot of VM's here, there are no <VM_NAME>.-flat.vmdk at all. Why?

The extent files are never shown in the GUI, only the pointer files.

Reply
0 Kudos
vwmagic
Enthusiast
Enthusiast
Jump to solution

Thanks a lot!

One last question, what is the way or commands I can display all such snapshots across the vCenter?

I am wondering how much space being taken  by them, and as I understand they should not be there.

As you can see, I am not really a VMware guy.

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

Be careful about mass-deleting snapshots across an entire vCenter. First, you'd want to run some tool/report/script to get an idea of how many snapshots are out there. If you don't have vROps, there are plenty of PowerCLI scripts that folks have built that can report this, and there's RVtools which can report on snapshots as well. Once you've found them and you're ok with their mass removal, you can again look to PowerCLI to script that process. There are many out there designed to do this.

Reply
0 Kudos
vwmagic
Enthusiast
Enthusiast
Jump to solution

<VM_NAME>_[0-9]-00000[0-9].vmdk

One thing really struck me about is what these files really are?

I have checked hundreds of VM's, and with hundreds and hundreds such files, they are all really small, most of them only has about hundreds or so KB, only very few has 1GB.

Are they really SnapShots/Changes? or Just a pointers pointing to Changes?

PLease if somebody can explain to me in details.

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

As I explained earlier, any file with the filename of *.vmdk is only a metadata descriptor file. This is why they're so small. You can open them in a text editor or just cat the contents from a shell session and view the layout. Files named *-flat.vmdk are the actual disk extents. Data stored in these files represent the actual data, the 0s and 1s that comprise files and filesystems. The *.vmdk files reference these *-flat.vmdk files and, in so doing the *.vmdk files act like symlinks, proxy files, or shortcuts (not really, but trying to illustrate the point).

Reply
0 Kudos
vwmagic
Enthusiast
Enthusiast
Jump to solution

Thank you! I didn't mean to neglect all your messages.

(<VM_NAME>_[0-9]-00000[0-9].vmdk)

So, they  are not necessarily related to SnapShots at all, Correct? If yes, then how can I tell what are those are related to SnapShots?

I have very few VM's have -flat.vmdk.

I don't have the access to ESXi host, only VSphere client.

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

Again, quoting from an earlier reply:

(<VM_NAME>_[0-9]-00000[0-9].vmdk)

So, they  are not necessarily related to SnapShots at all, Correct? If yes, then how can I tell what are those are related to SnapShots?

the files that have 000001, 000002, etc are snapshots.

I have very few VM's have -flat.vmdk.

The extent files are never shown in the GUI, only the pointer files.

If you don't have access to the ESXi shell, you won't see the *-flat.vmdk files as I point out, you'll only see the disk descriptors. Rest assured, those *-flat.vmdk files are there, otherwise you couldn't run a VM.

Reply
0 Kudos
vwmagic
Enthusiast
Enthusiast
Jump to solution

<VM_NAME>_1-000001.vmdk

Okay. It is related to Snapshot, but just a metadata descriptor file for the snapshot?

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

That specific file, yes, but remember there is also a disk extent file associated with it containing the data blocks themselves.

Reply
0 Kudos
vwmagic
Enthusiast
Enthusiast
Jump to solution

<VM_NAME>_1-000001.vmdk

Okay. Good.

Then what is the snapshot extent file associated with it containing the data blocks themselves? What could it look like?

Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

It's basically s.th. like:

Metadata: <VM_NAME>_1-000001.vmdk

Userdata: <VM_NAME>_1-000001-[delta|sesparse].vmdk

André

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

Yes, it's what André said, plus what I said to you in my very first response.

Reply
0 Kudos
vwmagic
Enthusiast
Enthusiast
Jump to solution

Metadata: <VM_NAME>_1-000001.vmdk

Userdata: <VM_NAME>_1-000001-[delta|sesparse].vmdk

GOOD. Thanks! I am closer.

How come then we have a lot of <VM_NAME>_1-000001.vmdk like, but so far I have seen none of  <VM_NAME>_1-000001-[delta|sesparse].vmdk like ??

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

How come then we have a lot of <VM_NAME>_1-000001.vmdk, but so far I have seen none of  <VM_NAME>_1-000001-[delta|sesparse].vmdk??

Because, as I've said, the disk extent data is masked from the GUI perspectives. Get SSH or ESXi shell access to one of your hosts. cd into the working directory for a VM with at least one snapshot. Run a ls -lh command in the directory and you'll see all the files.

Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Login to the ESXi host (on the Console, or via SSH) and run e.g. ls -lisa from the command line (in the VM's folder).

This should list you all of the files.

André

Reply
0 Kudos