VMDK files

Posted on 2016-08-11
Last Modified: 2016-08-17
When I browse Datastore in Vsphere, I see 3 .vmdk files

In Fact the VM has 3 Hard disks, however in some documentation it says the .vmdk is a Descriptor of the hard disk. What does that mean ?
I also see the:

ctk files if I am correct are for change tracking, but what does that mean? do they get created whenever there is a snapshot? how do they get created ?

Thank you
Question by:jskfan
  • 3
  • 2
  • 2
  • +1
LVL 14

Assisted Solution

by:Schnell Solutions
Schnell Solutions earned 100 total points
ID: 41752635
They are used for snapshots, or continuous backups.
LVL 119

Accepted Solution

Andrew Hancock (VMware vExpert / EE MVE^2) earned 200 total points
ID: 41752639
When you BROWSE you are not observing ALL the files, they are hidden because you are in "idiot view" mode.

there are a pair for every vmdk,



only the server.vmdk contains the VM OS data...

a file with a server_X.vmdk, means another disk, e.g. disk X.

and a file that looks like server-0000X.vmdk is a snapshot.

HOW TO: VMware Snapshots :- Be Patient

As for the VMDK files there are two...

you can read here

Recreating a missing virtual machine disk descriptor file (1002511)

*.vmdk - the descriptor which describes the disk geometry.

see my EE Article, and look and read the comments, it explains it in detail, and how it's calculated

HOW TO: Shrink a VMware Virtual Machine Disk (VMDK) in 15 minutes

the flat file, actually contains the VM OS DATA.

This is what CTK files are all  is about... they track blocks which have been changed, change block tracking

from Anton Gostev from Veeam on CBT:

In essence, CBT is all about CTK files, these are the files which contain change tracking information of the corresponding VMDK file.

The concept is pretty simple, and if you are familiar with AD DirSync control, or Exchange ICS (public folders change tracking) – it is essentially the same: global USN (Update Sequence Number) for each object. CTK file describes the state of each block for tracking purposes, and contain USN for each block in the corresponding VMDK. After any block is updated, it is assigned the new global USN (which is previous USN value that was used on previously processed block plus 1). This way, any application can ask VMware API “tell me if this block was changed since THIS moment”, and the API will easily tell that by simply comparing the provided sequence number with the actual USN on each block. If provided USN is smaller than actual for particular block, it means that the block was changed (and needs to be backed up, replicated or otherwise processed). So multiple processes cannot conflict with each other anyhow. Each process just memorizes the USN corresponding to the snapshot that the application created during processing, and next time it will use the memorized USN to query for changed blocks.

There should be one CTK file per VMDK file, and CTK file cannot grow out of proportion with number of blocks in VMDK (as it stores only 1 record per VMDK block). CTK file is also thousands time smaller than actual VMDK, because it stores only a few bytes of information (USN) for each corresponding 256KB VMDK block (I am 90% sure it is 256KB, used to calculate it once using CTK debug/stats data, just don’t remember for sure – unimportant info escapes my head automatically to prevent overload with useless facts ;) . For the same reasons, I/O overhead is barely noticeable with CBT: change few extra bytes to write for each 256000 bytes of data.

The CTK files are permanent, and should not be deleted after backup/replication.
LVL 10

Assisted Solution

by:Richardson Porto
Richardson Porto earned 200 total points
ID: 41752646
A VMware virtual disk is composed by two files, one descriptor file (that contains information about the virtual data disk) and a flat file (that contain the actual content data of the virtual disk).

The descriptor is something like mydisk.vmdk (it have small size) and the flat disk is something like mydisk-flat.vmdk (that may be a big file, depending of how much data you have on disk and/or how big is your virtual disk).

Browsing using the Datastore Browser through the vSphere Client, you will not see the files -flat.vmdk, to see these files you will need to log in through SSH on host.

The CTK files are created once any application that use the Change Block Tracking for example backup the virtual machine.

The file created by snapshots are the delta files, and it should looks like -00001.vmdk and -00001-delta.vmdk.
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

LVL 119
ID: 41752658
didn't we do this here on the 15 July 2016 ?

vmware VMDK Files

do you have poor memory ? forget ? easier to post and ask the question again, rather than look up your previous answer ?

Author Comment

ID: 41752707
*.vmdk - the descriptor which describes the disk geometry.

.VMDK I see it is 40GB it got to be the physical file of the first hard disk
_1.VMDK I see it is 62GB it got to be the physical file of the second hard disk
_2.VMDK I see it is 52GB it got to be the physical file of the third hard disk

so where is the descriptor ?
LVL 119
ID: 41752722
logon to the console, or remotely via SSH, and view the files.

in vSphere Client Browser Mode, it groups all the files together, "idiot mode"

you cannot see the pair of files which make up the virtual machine disk ?

server.vmdk is a TEXT FILE!

Understand now ?
LVL 10

Assisted Solution

by:Richardson Porto
Richardson Porto earned 200 total points
ID: 41752777
To see both files (descriptor and flat) separately you have to login on host through SSH, navigate to the folder where files are stored. After you locate the file you can open the mydisk.vmdk with a text editor, like vi.

Author Closing Comment

ID: 41760366
Thank you

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
San to San Replication Slowness/Issues 3PAR 7000 5 43
Virtualize old XP PC 8 54
Hit router interface limit 7 37
cannot remove vmnic 7 30
Will try to explain how to use the VMware feature TAGs in the VMs and create Veeam Backup Jobs using TAGs. Since this article is too long, I will create second article for the Veeam tasks.
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
Teach the user how to rename, unmount, delete and upgrade VMFS datastores. Open vSphere Web Client: Rename VMFS and NFS datastores: Upgrade VMFS-3 volume to VMFS-5: Unmount VMFS datastore: Delete a VMFS datastore:
Teach the user how to convert virtaul disk file formats and how to rename virtual machine files on datastores. Open vSphere Web Client: Review VM disk settings: Migrate VM to new datastore with a thick provisioned (lazy zeroed) disk format: Rename a…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question